Source

jsmn / jsmn.c

Diff from to
 				token = &tokens[parser->toknext - 1];
 				for (;;) {
 					if (token->start != -1 && token->end == -1) {
+						if (token->type != type) {
+							return JSMN_ERROR_INVAL;
+						}
 						token->end = parser->pos + 1;
 						parser->toksuper = token->parent;
 						break;