Fix TEST simplification logic (again).

"ip.DstAddr >= 0.0.0.0" ---> "ip"
"ip.DstAddr <  0.0.0.0" ---> "false"

Previously, the latter simplified to "not ip".
This commit is contained in:
basil00
2023-03-16 07:04:24 +08:00
parent a255d6776e
commit f7421f0671
+2 -2
View File
@@ -1949,8 +1949,8 @@ static void WinDivertSimplifyTest(PEXPR test)
default:
return;
}
test->arg[0] = WinDivertMakeVar(type, NULL);
test->arg[1] = (result? WinDivertMakeOne(): WinDivertMakeZero());
test->arg[0] = WinDivertMakeVar((result? type: TOKEN_ZERO), NULL);
test->arg[1] = WinDivertMakeOne();
test->kind = TOKEN_EQ;
}