aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Bedo <cu@cua0.org>2012-07-18 21:50:48 +0200
committerJustin Bedo <cu@cua0.org>2012-07-18 21:50:48 +0200
commit11f9c6a33f3de9b3a8e3a2ca63fcb2f35371f6a8 (patch)
tree9326041a7d67fd9fa7530c67f806967b980718d7
parent06a376f7f913bd57a1256898a04882818deaefa4 (diff)
Fixed parsing of true/false and nullHEADmaster
-rw-r--r--json.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/json.c b/json.c
index 9f52bc7..8061782 100644
--- a/json.c
+++ b/json.c
@@ -147,7 +147,8 @@ Jmatcherr:
tok = gettok(p);
tok->type = JBool;
tok->start = s;
- tok->end = s + 1;
+ s = saccept(s, "truefalse");
+ tok->end = s--;
incnsub(p);
continue;
}
@@ -156,7 +157,8 @@ Jmatcherr:
tok = gettok(p);
tok->type = JNil;
tok->start = s;
- tok->end = s + 1;
+ s = saccept(s, "null");
+ tok->end = s--;
incnsub(p);
continue;
}