From c875de4626b20b91081930501ef7704df7ce58dd Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 10 Aug 2018 10:50:39 +1000 Subject: [PATCH] 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 --- src/libinput-util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libinput-util.h b/src/libinput-util.h index 537de573..46421cbf 100644 --- a/src/libinput-util.h +++ b/src/libinput-util.h @@ -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;