Parent Directory | Revision Log | Patch
--- spamassassin/trunk/spamc/libspamc.c 2005/05/26 05:13:29 178586 +++ spamassassin/trunk/spamc/libspamc.c 2005/05/26 05:14:14 178587 @@ -733,7 +733,8 @@ static float _locale_safe_string_to_floa cp = (dot + 1); postdot = (float) (strtol(cp, NULL, 10)); - if (postdot == 0.0) { + /* note: don't compare floats == 0.0, it's unsafe. use a range */ + if (postdot >= -0.00001 && postdot <= 0.00001) { return ret; }
infrastructure at apache.org | ViewVC Help |
Powered by ViewVC 1.1.26 |