]> granicus.if.org Git - json-c/commitdiff
no comment in strict mode
authorRemi Collet <fedora@famillecollet.com>
Wed, 21 Aug 2013 13:41:40 +0000 (15:41 +0200)
committerRemi Collet <fedora@famillecollet.com>
Wed, 21 Aug 2013 13:41:40 +0000 (15:41 +0200)
json_tokener.c

index 45390ac233e9ec100776719f4328047ec6bf615b..7ce53ca70677618a7e6a5e58ad4205015def8112 100644 (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)))
          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;