From 693bd558eef3580eacf6f2cb3708d408981c62b9 Mon Sep 17 00:00:00 2001 From: Rob Pilling Date: Mon, 27 Nov 2023 08:42:42 +0000 Subject: [PATCH] JSON.parse(): ensure jspHasError() is always checked --- src/jswrap_json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jswrap_json.c b/src/jswrap_json.c index 77c90287b1..7fcb89958d 100644 --- a/src/jswrap_json.c +++ b/src/jswrap_json.c @@ -137,7 +137,7 @@ JsVar *jswrap_json_parse_internal(JSONFlags flags) { case '{': { JsVar *obj = jsvNewObject(); if (!obj) return 0; jslGetNextToken(); // { - while (lex->tk == LEX_STR || lex->tk == LEX_ID && !jspHasError()) { + while ((lex->tk == LEX_STR || lex->tk == LEX_ID) && !jspHasError()) { if (!(flags&JSON_DROP_QUOTES)) { jslMatch(LEX_STR); return obj;