mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-02-03 21:40:40 +01:00
util: switch to a check for isnormal for safe_atod
Effectively the same check as before but this should also encompass FP_SUBNORMAL. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
e73f6a3899
commit
c875de4626
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue