]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[script] Handle -0 in float comparisons correctly
authorCharlie Brej <cbrej@cs.man.ac.uk>
Tue, 30 Jun 2009 14:27:34 +0000 (15:27 +0100)
committerCharlie Brej <cbrej@cs.man.ac.uk>
Tue, 30 Jun 2009 14:27:34 +0000 (15:27 +0100)
src/plugins/splash/script/script-execute.c

index 5640eae0d878ab0fe24c16a786b05fe1d57a4241..2b8c086888883ec25ba6ae20d5dc5f2b9d226400 100644 (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;}
     }