Clear errno before calling strtod()

Fixes GH-27.
This commit is contained in:
Petri Lehtinen 2011-05-24 09:59:39 +03:00
parent 49fc708d4c
commit 013b8b3f60

View File

@ -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);