summaryrefslogtreecommitdiff
path: root/json_tokener.c
diff options
context:
space:
mode:
authorEric Haszlakiewicz <erh+git@nimenees.com>2012-04-24 22:17:13 -0500
committerEric Haszlakiewicz <erh+git@nimenees.com>2012-04-24 22:17:13 -0500
commitf931f61851c949f8ab943dee8935b0d775346178 (patch)
treeaa6b8098b1348055df2cffc09886b3ccd0cd55d2 /json_tokener.c
parent4e000a65e671588749a670c5d954ffa8d2d41b0a (diff)
Fixed parsing numbers in E notation. `
Diffstat (limited to 'json_tokener.c')
-rw-r--r--json_tokener.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/json_tokener.c b/json_tokener.c
index 1dc06e4..1c82484 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;