jv_parse: let decNumberFromString/strtod parse complex nans as a NaN

Before this patch (when using decNumber), "Nan123" was parsed as a NaN,
only if the first n was uppercase.
This commit is contained in:
Emanuele Torre authored and GitHub committed 2023-12-13 20:14:31 +01:00
1 parent dcf9a8e580
commit c5fd64ba97
2 files changed
+6 -1

No files matched your search

+5
View File
@@ -1938,6 +1938,11 @@ tojson | fromjson
{"a":nan}
{"a":null}
# also "nan with payload" #2985
fromjson | isnan
"nan1234"
true
# calling input/0, or debug/0 in a test doesn't crash jq