1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-15 09:44:04 +00:00

Use dcompare when comparing doubles.

Truncated longs are not desired as ${if_match 0.1 > 0.0} would skip the
block.
This commit is contained in:
Bas Pape 2013-08-13 19:50:27 +02:00
parent 275ba43836
commit d80a97d2f2

View File

@ -249,7 +249,7 @@ int compare(const char *expr)
dbl_a = arg_to_double(expr_dup); dbl_a = arg_to_double(expr_dup);
dbl_b = arg_to_double(expr_dup + idx + 1); dbl_b = arg_to_double(expr_dup + idx + 1);
free(expr_dup); free(expr_dup);
return lcompare(dbl_a, mtype, dbl_b); return dcompare(dbl_a, mtype, dbl_b);
case ARG_BAD: /* make_gcc_happy() */; case ARG_BAD: /* make_gcc_happy() */;
} }
/* not reached */ /* not reached */