From 4ebaebf4852608cb49f280eaf90f44ad7d343016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sun, 5 Apr 2015 09:40:39 +0200 Subject: [PATCH] AS3 direct editing: Increment/Decrement local register fix --- .../decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java index b0d889609..0279c2ad5 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/parser/script/NameAVM2Item.java @@ -23,6 +23,8 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.DecrementIIns import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.DecrementIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.IncrementIIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.arithmetic.IncrementIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.DecLocalIIns; +import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.DecLocalIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.IncLocalIIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.localregs.IncLocalIns; import com.jpexs.decompiler.flash.abc.avm2.instructions.other.GetScopeObjectIns; @@ -333,7 +335,7 @@ public class NameAVM2Item extends AssignableAVM2Item { ); } else { return toSourceMerge(localData, generator, - ins(isInteger ? new IncLocalIIns() : new IncLocalIns(), regNumber)); + (decrement? ins(isInteger ? new DecLocalIIns() : new DecLocalIns(), regNumber):ins(isInteger ? new IncLocalIIns() : new IncLocalIns(), regNumber))); } } return toSourceMerge(localData, generator,