From f3c48c01da1890c148c4dac747481a8dd53c1b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 23 Aug 2025 09:31:48 +0200 Subject: [PATCH] Fixed: Settemp on catch clause --- .../decompiler/flash/abc/avm2/graph/AVM2Graph.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java index 476d684c1..26284274a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java @@ -124,6 +124,7 @@ import com.jpexs.decompiler.graph.model.NotItem; import com.jpexs.decompiler.graph.model.OrItem; import com.jpexs.decompiler.graph.model.PopItem; import com.jpexs.decompiler.graph.model.PushItem; +import com.jpexs.decompiler.graph.model.SetTemporaryItem; import com.jpexs.decompiler.graph.model.SwitchItem; import com.jpexs.decompiler.graph.model.TernarOpItem; import com.jpexs.decompiler.graph.model.TrueItem; @@ -1430,11 +1431,11 @@ public class AVM2Graph extends Graph { List currentCatchCommands = printGraph(foundGotos, partCodes, partCodePos, visited, localData2, st2, allParts, null, catchPart, stopPart2, stopPartKind2, loops, throwStates, staticOperation, path); st2.finishBlock(currentCatchCommands); - /*if (!currentCatchCommands.isEmpty() && (currentCatchCommands.get(0) instanceof SetLocalAVM2Item)) { - if (currentCatchCommands.get(0).value.getNotCoerced() instanceof ExceptionAVM2Item) { - currentCatchCommands.remove(0); - } - }*/ + while (!currentCatchCommands.isEmpty() + && currentCatchCommands.get(0) instanceof SetTemporaryItem + && currentCatchCommands.get(0).value.getNotCoerced() instanceof ExceptionAVM2Item) { + currentCatchCommands.remove(0); + } loopwith: while (!currentCatchCommands.isEmpty() && (currentCatchCommands.get(0) instanceof WithAVM2Item)) { WithAVM2Item w = (WithAVM2Item) currentCatchCommands.get(0);