Browse Source

no comment in strict mode

tags/json-c-0.12-20140410
Remi Collet 12 years ago
parent
commit
87fa32dfe0
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      json_tokener.c

+ 1
- 1
json_tokener.c View File

@@ -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;


Loading…
Cancel
Save