Fixed: #2519 AS1/2 avoid multi-level loops in cases where possible

This commit is contained in:
Jindra Petřík
2025-08-22 19:29:04 +02:00
parent fc3b4a378e
commit 4b48b8408a
4 changed files with 94 additions and 1 deletions

View File

@@ -3287,7 +3287,13 @@ public class Graph {
System.err.println("Adding break");
}
makeAllCommands(ret, stack);
ret.add(new BreakItem(dialect, null, localData.lineStartInstruction, el.id));
BreakItem br = new BreakItem(dialect, null, localData.lineStartInstruction, el.id);
if (part.start >= code.size() - 1) {
br.isScriptEnd = true;
}
ret.add(br);
return ret;
}
if (el.loopPreContinue == part) {