Browse Source

Fixed parsing numbers in E notation. `

tags/json-c-0.10-20120530
Eric Haszlakiewicz 13 years ago
parent
commit
f931f61851
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      json_tokener.c

+ 2
- 1
json_tokener.c View File

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


Loading…
Cancel
Save