ref: cd89968ef5b44ba34df56629c233af959af90c0a
parent: e5451b8a90a6cd4901438d4066dc2609927228d3
author: ozan yigit <ozan.yigit@gmail.com>
date: Tue Jan 7 08:52:33 EST 2025
fix hex number detection in is_valid_number.
--- a/lib.c
+++ b/lib.c
@@ -889,7 +889,7 @@
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 */
--
⑨