From: Fabrice Bellard Date: Sat, 21 Nov 2026 16:02:32 +0000 (+0100) Subject: fixed array literal parsing (gengjiawen) X-Git-Url: https://git.kaiwu.me/http/%22../static/gitweb.js?a=commitdiff_plain;h=c4b449ce4b119bd43b48898a8b0f69f2c6522d82;p=quickjs.git fixed array literal parsing (gengjiawen) --- diff --git a/quickjs.c b/quickjs.c index 7d23daf..1544e4f 100644 --- a/quickjs.c +++ b/quickjs.c @@ -26498,7 +26498,9 @@ static __exception int js_parse_array_literal(JSParseState *s) if (s->token.val == ',') { if (next_token(s)) return -1; - } + } else + if (s->token.val != ']') + goto done; } if (s->token.val == ']') { if (need_length) {