aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}