mirror of
https://github.com/json-c/json-c.git
synced 2026-03-27 00:49:07 +08:00
no comment in strict mode
This commit is contained in:
@@ -265,7 +265,7 @@ struct json_object* json_tokener_parse_ex(struct json_tokener *tok,
|
|||||||
if ((!ADVANCE_CHAR(str, tok)) || (!PEEK_CHAR(c, tok)))
|
if ((!ADVANCE_CHAR(str, tok)) || (!PEEK_CHAR(c, tok)))
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if(c == '/') {
|
if(c == '/' && !(tok->flags & JSON_TOKENER_STRICT)) {
|
||||||
printbuf_reset(tok->pb);
|
printbuf_reset(tok->pb);
|
||||||
printbuf_memappend_fast(tok->pb, &c, 1);
|
printbuf_memappend_fast(tok->pb, &c, 1);
|
||||||
state = json_tokener_state_comment_start;
|
state = json_tokener_state_comment_start;
|
||||||
|
|||||||
Reference in New Issue
Block a user