From: Remi Collet Date: Wed, 21 Aug 2013 13:41:40 +0000 (+0200) Subject: no comment in strict mode X-Git-Tag: json-c-0.12-20140410~32^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=87fa32dfe013d961ced5252ffacef0beefc8f62f;p=thirdparty%2Fjson-c.git no comment in strict mode --- diff --git a/json_tokener.c b/json_tokener.c index 45390ac2..7ce53ca7 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;