Clear errno before calling strtod()
Fixes GH-27.
This commit is contained in:
parent
49fc708d4c
commit
013b8b3f60
@ -525,6 +525,7 @@ static int lex_scan_number(lex_t *lex, int c, json_error_t *error)
|
||||
lex_unget_unsave(lex, c);
|
||||
|
||||
saved_text = strbuffer_value(&lex->saved_text);
|
||||
errno = 0;
|
||||
value = strtod(saved_text, &end);
|
||||
assert(end == saved_text + lex->saved_text.length);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user