From b37771c9a6f3f004b83b95e674c6f9692a0c44dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sun, 15 Jan 2023 17:07:35 +0100 Subject: [PATCH] enumeration last in makeAllCommands --- .../com/jpexs/decompiler/flash/action/ActionGraph.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java index 5db237de8..1593af11a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java @@ -28,7 +28,6 @@ import com.jpexs.decompiler.flash.action.model.GetPropertyActionItem; import com.jpexs.decompiler.flash.action.model.SetTarget2ActionItem; import com.jpexs.decompiler.flash.action.model.SetTargetActionItem; import com.jpexs.decompiler.flash.action.model.SetTypeActionItem; -import com.jpexs.decompiler.flash.action.model.SetVariableActionItem; import com.jpexs.decompiler.flash.action.model.StoreRegisterActionItem; import com.jpexs.decompiler.flash.action.model.TemporaryRegister; import com.jpexs.decompiler.flash.action.model.TemporaryRegisterMark; @@ -426,6 +425,10 @@ public class ActionGraph extends Graph { } public void makeAllCommands(List commands, TranslateStack stack) { + GraphTargetItem enumerate = null; + if(!commands.isEmpty() && (commands.get(commands.size()-1) instanceof EnumerateActionItem)) { + enumerate = commands.remove(commands.size() -1 ); + } super.makeAllCommands(commands, stack); //ags.getVariables() ActionGraphSource ags = (ActionGraphSource) code; @@ -461,6 +464,9 @@ public class ActionGraph extends Graph { } } + if (enumerate != null) { + commands.add(enumerate); + } } @Override