Revert. IF is a macro, if is a conditional statement. Furthermore, casting to an unsigned 32 bit integer on a 64 bit machine causes the the x<0 to always be false. But since there is a comma, the "bad integer" was evaluating to a nonzero address and so the conditional was always true and the empty statement would be executed. That is wrong.

This commit is contained in:
Steve Checkoway
2009-01-05 06:17:44 +00:00
parent 503999eedc
commit dbca9eedf6
+1 -1
View File
@@ -67,7 +67,7 @@ static int LoadInt(LoadState* S)
LoadVar(S,x);
if (S->flip)
x = Swap32(x);
if ((uint32_t)x<0, "bad integer");
IF ((int32_t)x<0, "bad integer");
return x;
}