Skip to content

Commit

Permalink
util: switch to a check for isnormal for safe_atod
Browse files Browse the repository at this point in the history
Effectively the same check as before but this should also encompass
FP_SUBNORMAL.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
  • Loading branch information
whot committed Aug 13, 2018
1 parent e73f6a3 commit c875de4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libinput-util.h
Expand Up @@ -571,7 +571,7 @@ safe_atod(const char *str, double *val)
return false;
if (*str != '\0' && *endptr != '\0')
return false;
if (isnan(v) || isinf(v))
if (v != 0.0 && !isnormal(v))
return false;

*val = v;
Expand Down

0 comments on commit c875de4

Please sign in to comment.