Fixed: AS1/2/3 highligter - brackets parsing error causing memory leak / crash

This commit is contained in:
Jindra Petřík
2025-06-29 23:43:37 +02:00
parent e6fb646b1b
commit d46e275811
4 changed files with 45 additions and 8 deletions
@@ -1650,8 +1650,8 @@ public class ActionScript3SimpleParser implements SimpleParser {
arrCnt++;
expression(errors, thisType, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, isStatic, true, variables, false, abc);
s = lex();
if (!s.isType(SymbolType.COMMA, SymbolType.BRACKET_CLOSE)) {
expected(errors, s, lexer.yyline(), SymbolType.COMMA, SymbolType.BRACKET_CLOSE);
if (!expected(errors, s, lexer.yyline(), SymbolType.COMMA, SymbolType.BRACKET_CLOSE)) {
break;
}
}
} else {
@@ -1249,8 +1249,8 @@ public class ActionScript2SimpleParser implements SimpleParser {
arrCnt++;
expression(errors, inFunction, inMethod, inTellTarget, true, variables, false, hasEval);
s = lex();
if (!s.isType(SymbolType.COMMA, SymbolType.BRACKET_CLOSE)) {
expected(errors, s, lexer.yyline(), SymbolType.COMMA, SymbolType.BRACKET_CLOSE);
if (!expected(errors, s, lexer.yyline(), SymbolType.COMMA, SymbolType.BRACKET_CLOSE)) {
break;
}
}
} else {