From 4ce44040579e65755d14a3d7dabdae0913959a24 Mon Sep 17 00:00:00 2001 From: pt300 Date: Sat, 1 Oct 2016 18:19:20 +0200 Subject: [PATCH] Seems to actually fix zserge/jsmn#81 --- jsmn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsmn.c b/jsmn.c index da9bf21..bcd6392 100644 --- a/jsmn.c +++ b/jsmn.c @@ -198,7 +198,7 @@ int jsmn_parse(jsmn_parser *parser, const char *js, size_t len, break; } if (token->parent == -1) { - if(token->type != type) { + if(token->type != type || parser->toksuper == -1) { return JSMN_ERROR_INVAL; } break;