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:
1 parent
dcf9a8e580
commit
c5fd64ba97
2 files changed
+6
-1
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user