mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-05 15:05:10 +00:00
Fixed AS1/2 - direct editation - try..finally without catch clause
This commit is contained in:
@@ -185,7 +185,7 @@ public class TryActionItem extends ActionItem implements Block {
|
||||
int catchSize = 0;
|
||||
int catchRegister = 0;
|
||||
boolean catchInRegisterFlag = false;
|
||||
if (catchCommands != null && !catchCommands.isEmpty()) {
|
||||
if (!catchCommands.isEmpty()) {
|
||||
|
||||
List<GraphSourceItem> fullCatchBody = new ArrayList<>();
|
||||
|
||||
@@ -266,7 +266,7 @@ public class TryActionItem extends ActionItem implements Block {
|
||||
finallySize = Action.actionsToBytes(finallyCommandsA, false, SWF.DEFAULT_VERSION).length;
|
||||
}
|
||||
int trySize = Action.actionsToBytes(tryCommandsA, false, SWF.DEFAULT_VERSION).length;
|
||||
ret.add(new ActionTry(catchInRegisterFlag, finallyCommands != null, catchCommands != null, catchName, catchRegister, trySize, catchSize, finallySize, SWF.DEFAULT_VERSION));
|
||||
ret.add(new ActionTry(catchInRegisterFlag, finallyCommands != null, !catchCommands.isEmpty(), catchName, catchRegister, trySize, catchSize, finallySize, SWF.DEFAULT_VERSION));
|
||||
ret.addAll(tryCommandsA);
|
||||
if (catchCommandsA != null) {
|
||||
ret.addAll(catchCommandsA);
|
||||
|
||||
@@ -1313,7 +1313,7 @@ public class ActionScript2Parser {
|
||||
tryCommands.add(command(inFunction, inMethod, forinlevel, inTellTarget, true, variables, functions, hasEval));
|
||||
s = lex();
|
||||
boolean found = false;
|
||||
List<List<GraphTargetItem>> catchCommands = null;
|
||||
List<List<GraphTargetItem>> catchCommands = new ArrayList<>();
|
||||
List<GraphTargetItem> catchExceptionNames = new ArrayList<>();
|
||||
List<GraphTargetItem> catchExceptionTypes = new ArrayList<>();
|
||||
|
||||
@@ -1330,9 +1330,6 @@ public class ActionScript2Parser {
|
||||
lexer.pushback(s);
|
||||
}
|
||||
expectedType(SymbolType.PARENT_CLOSE);
|
||||
if (catchCommands == null) {
|
||||
catchCommands = new ArrayList<>();
|
||||
}
|
||||
List<GraphTargetItem> cc = new ArrayList<>();
|
||||
cc.add(command(inFunction, inMethod, forinlevel, inTellTarget, true, variables, functions, hasEval));
|
||||
catchCommands.add(cc);
|
||||
|
||||
Reference in New Issue
Block a user