From 87fa32dfe013d961ced5252ffacef0beefc8f62f Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 21 Aug 2013 15:41:40 +0200 Subject: [PATCH] no comment in strict mode --- json_tokener.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.49.0