From 25647e692c7906b96ffd2b05ca54c097948e879c Mon Sep 17 00:00:00 2001 From: P4t Date: Thu, 14 Oct 2021 13:51:38 +0200 Subject: [PATCH] Fix position of a comment in string parsing Fixes #214 --- jsmn.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jsmn.h b/jsmn.h index 41219b7..8ac14c1 100644 --- a/jsmn.h +++ b/jsmn.h @@ -196,10 +196,10 @@ static int jsmn_parse_string(jsmn_parser *parser, const char *js, jsmntok_t *token; int start = parser->pos; - - parser->pos++; - + /* Skip starting quote */ + parser->pos++; + for (; parser->pos < len && js[parser->pos] != '\0'; parser->pos++) { char c = js[parser->pos];