[script] Handle -0 in float comparisons correctly

This commit is contained in:
Charlie Brej 2009-06-30 15:27:34 +01:00 committed by Ray Strode
parent 4a6ba0212e
commit 8786b2eba6

View file

@ -523,7 +523,7 @@ static script_obj* script_evaluate_cmp (script_state* state, script_exp* exp)
}
if(valset){
if (val < 0) {lt = 1; ne = 1;}
if (val == 0) eq = 1;
if (fabsf(val) == 0) eq = 1;
if (val > 0) {gt = 1; ne = 1;}
}