summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2013-08-21 15:41:40 +0200
committerRemi Collet <fedora@famillecollet.com>2013-08-21 15:41:40 +0200
commit87fa32dfe013d961ced5252ffacef0beefc8f62f (patch)
tree1af3d111eaab8a54b8ea644e6b76e4e4cc406d79
parenta07ef3d19763094ab35cc009657c85bcbb9dd9ae (diff)
downloadjson-c-87fa32dfe013d961ced5252ffacef0beefc8f62f.tar.gz
no comment in strict mode
-rw-r--r--json_tokener.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/json_tokener.c b/json_tokener.c
index 45390ac..7ce53ca 100644
--- a/json_tokener.c
+++ b/json_tokener.c
@@ -265,7 +265,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
if ((!ADVANCE_CHAR(str, tok)) || (!PEEK_CHAR(c, tok)))
goto out;
}
- if(c == '/') {
+ if(c == '/' && !(tok->flags & JSON_TOKENER_STRICT)) {
printbuf_reset(tok->pb);
printbuf_memappend_fast(tok->pb, &c, 1);
state = json_tokener_state_comment_start;