]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
Fixed parsing numbers in E notation. `
authorEric Haszlakiewicz <erh+git@nimenees.com>
Wed, 25 Apr 2012 03:17:13 +0000 (22:17 -0500)
committerEric Haszlakiewicz <erh+git@nimenees.com>
Wed, 25 Apr 2012 03:17:13 +0000 (22:17 -0500)
json_tokener.c

index 1dc06e4a842e4f4871eff26b75615abd6a259607..1c8248472ee042a1394bf66792bf2f35ef7c10d1 100644 (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;