Fixed JSON errno == ERANGE error

This commit is contained in:
Alex Zolotarev 2011-05-23 21:16:19 +02:00 committed by Alex Zolotarev
parent 32df24937c
commit e6b9d555a4

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