From: Eric Haszlakiewicz Date: Wed, 25 Apr 2012 03:17:13 +0000 (-0500) Subject: Fixed parsing numbers in E notation. ` X-Git-Tag: json-c-0.10-20120530~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f931f61851c949f8ab943dee8935b0d775346178;p=thirdparty%2Fjson-c.git Fixed parsing numbers in E notation. ` --- diff --git a/json_tokener.c b/json_tokener.c index 1dc06e4a..1c824847 100644 --- a/json_tokener.c +++ b/json_tokener.c @@ -562,7 +562,8 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok, int case_len=0; while(c && strchr(json_number_chars, c)) { ++case_len; - if(c == '.' || c == 'e') tok->is_double = 1; + if(c == '.' || c == 'e' || c == 'E') + tok->is_double = 1; if (!ADVANCE_CHAR(str, tok) || !POP_CHAR(c, tok)) { printbuf_memappend_fast(tok->pb, case_start, case_len); goto out;