From edd751896de5de1fcee95cb65949e6784c726751 Mon Sep 17 00:00:00 2001 From: "Serge A. Zaitsev" Date: Sat, 17 Oct 2015 14:58:47 +0200 Subject: [PATCH] fixed return value on incremental parting --- jsmn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsmn.c b/jsmn.c index a0f4f69..7d701a7 100644 --- a/jsmn.c +++ b/jsmn.c @@ -155,7 +155,7 @@ jsmnerr_t jsmn_parse(jsmn_parser *parser, const char *js, size_t len, jsmnerr_t r; int i; jsmntok_t *token; - int count = 0; + int count = parser->toknext; for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { char c;