aboutsummaryrefslogtreecommitdiff
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index a2731d63d12b..486d7da3c38e 100644
--- a/lib.c
+++ b/lib.c
@@ -889,7 +889,7 @@ bool is_valid_number(const char *s, bool trailing_stuff_ok,
s++;
/* no hex floating point, sorry */
- if (s[0] == '0' && tolower(s[1]) == 'x')
+ if (s[0] == '0' && tolower(s[1]) == 'x' && isxdigit(s[2]))
return false;
/* allow +nan, -nan, +inf, -inf, any other letter, no */