From eb9959a171137dc2dae13ca51071e782679d9a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 10 Feb 2018 22:31:04 +0100 Subject: [PATCH] Fix: HAS_OPTIONAL flag in AVM2 code displayed twice --- .../src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java index d94faf62c..2600d6842 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Code.java @@ -1176,7 +1176,6 @@ public class AVM2Code implements Cloneable { writer.appendNoHilight("flag "); writer.hilightSpecial("HAS_OPTIONAL", HighlightSpecialType.FLAG_HAS_OPTIONAL); writer.newLine(); - writer.appendNoHilight("flag HAS_OPTIONAL").newLine(); } if (info.flagHas_paramnames()) { writer.appendNoHilight("flag "); @@ -2173,8 +2172,7 @@ public class AVM2Code implements Cloneable { ins.operands[j] = updater.updateOperandOffset(target, ins.operands[j]); } }*/ //Faster, but not so universal - { - if (ins.definition instanceof IfTypeIns) { + if (ins.definition instanceof IfTypeIns) { long target = ins.getTargetAddress(); try { ins.operands[0] = updater.updateOperandOffset(ins.getAddress(), target, ins.operands[0]); @@ -2182,7 +2180,6 @@ public class AVM2Code implements Cloneable { throw new ConvertException("Invalid offset (" + ins + ")", i); } } - } ins.setAddress(updater.updateInstructionOffset(ins.getAddress())); //Note: changing operands here does not change instruction byte length as offsets are always S24 (not variable length) }