From 86f2f7fdce471ad925508f08745852c14ff32b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Tue, 16 Feb 2021 22:23:04 +0100 Subject: [PATCH] AS3 direct editation: try..finally generates pushbyte -1, not pushbyte 255 --- .../flash/abc/avm2/parser/script/AVM2SourceGenerator.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java index a005f125d..606468f03 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/AVM2SourceGenerator.java @@ -921,9 +921,6 @@ public class AVM2SourceGenerator implements SourceGenerator { finallySwitchCmds.addAll(toInsList(AssignableAVM2Item.getTemp(localData, this, tempReg2))); finallySwitchCmds.add(ins(AVM2Instructions.Kill, tempReg2.getVal())); finallySwitchCmds.add(ins(AVM2Instructions.Throw)); - finallySwitchCmds.add(ins(AVM2Instructions.PushByte, 255)); - finallySwitchCmds.add(ins(AVM2Instructions.PopScope)); - finallySwitchCmds.add(ins(AVM2Instructions.Kill, tempReg.getVal())); int finSwitchLen = insToBytes(finallySwitchCmds).length; @@ -933,7 +930,7 @@ public class AVM2SourceGenerator implements SourceGenerator { preCatches.add(0, fjump); preCatches.add(0, new ExceptionMarkAVM2Instruction(finallyEx, MARK_E_END)); - preCatches.add(0, ins(AVM2Instructions.PushByte, 255)); + preCatches.add(0, ins(AVM2Instructions.PushByte, -1)); finallySwitchCmds.add(new ExceptionMarkAVM2Instruction(finallyEx, MARK_E_FINALLYPART));