summaryrefslogtreecommitdiff
path: root/json_tokener.c
diff options
context:
space:
mode:
authorMichael Clark <michael@metaparadigm.com>2007-12-07 02:44:24 +0000
committerMichael Clark <michael@metaparadigm.com>2007-12-07 02:44:24 +0000
commitc8f4a6e7de8a4307ca795f307774ef66e1248c11 (patch)
treee8d77e7901c83019b878ccb9058aa2225b8efb46 /json_tokener.c
parentdfaf67043658eef1d76df9d3f71b4952302ee936 (diff)
downloadjson-c-c8f4a6e7de8a4307ca795f307774ef66e1248c11.tar.gz
* Fix bug with use of capital E in numbers with exponents
Mateusz Loskot, mateusz at loskot dot net * Add stddef.h include git-svn-id: http://svn.metaparadigm.com/svn/json-c/trunk@19 327403b1-1117-474d-bef2-5cb71233fd97
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 ba329fe..c904f48 100644
--- a/json_tokener.c
+++ b/json_tokener.c
@@ -13,6 +13,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <stddef.h>
#include <ctype.h>
#include <string.h>
@@ -378,7 +379,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
case json_tokener_state_number:
if(c && strchr(json_number_chars, c)) {
printbuf_memappend(tok->pb, &c, 1);
- if(c == '.' || c == 'e') tok->is_double = 1;
+ if(c == '.' || c == 'e' || c == 'E') tok->is_double = 1;
} else {
int numi;
double numd;