diff --git a/jsmn.c b/jsmn.c index aaba6a10..a886691b 100644 --- a/jsmn.c +++ b/jsmn.c @@ -343,7 +343,7 @@ int jsmn_parse(jsmn_parser *parser, const char *js, size_t len, if (parser->toksuper != -1 && tokens != NULL) tokens[parser->toksuper].size++; #ifdef JSMN_STRICT - if (tokens != NULL) { + if (tokens != NULL && parser->toksuper != -1) { parser->toktype = jsmn_string_next_tok (&tokens[parser->toksuper], parser->toktype); }