From d49e0ad6addce9436bb940f70490d68d93c5b5fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 16 Aug 2025 17:51:02 +0200 Subject: [PATCH] Fix TestIncDec11 --- .../abc/avm2/instructions/other/SetSlotIns.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java index 42d290bab..17086e52b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/instructions/other/SetSlotIns.java @@ -105,10 +105,14 @@ public class SetSlotIns extends InstructionDefinition implements SetTypeIns { if (!stack.isEmpty()) { GraphTargetItem top = stack.peek().getNotCoerced().getThroughDuplicate(); if (top == inside) { - stack.pop(); + //GraphTargetItem.checkDup(stack, output, inside, top); + GraphTargetItem.checkDup(stack, output, stack.pop(), value.getNotCoercedNoDup()); + //stack.pop(); stack.push(new PostIncrementAVM2Item(ins, localData.lineStartInstruction, inside)); } else if ((top instanceof IncrementAVM2Item) && (((IncrementAVM2Item) top).value == inside)) { - stack.pop(); + GraphTargetItem.checkDup(stack, output, stack.pop(), value.getNotCoercedNoDup()); + //stack.pop(); + //TestIncDec11 with result stack.push(new PreIncrementAVM2Item(ins, localData.lineStartInstruction, inside)); } else { stack.addToOutput(new PostIncrementAVM2Item(ins, localData.lineStartInstruction, inside)); @@ -131,10 +135,13 @@ public class SetSlotIns extends InstructionDefinition implements SetTypeIns { if (!stack.isEmpty()) { GraphTargetItem top = stack.peek().getNotCoerced().getThroughDuplicate(); if (top == inside) { - stack.pop(); + GraphTargetItem.checkDup(stack, output, stack.pop(), value.getNotCoercedNoDup()); + //stack.pop(); stack.push(new PostDecrementAVM2Item(ins, localData.lineStartInstruction, inside)); } else if ((top instanceof DecrementAVM2Item) && (((DecrementAVM2Item) top).value == inside)) { - stack.pop(); + GraphTargetItem.checkDup(stack, output, stack.pop(), value.getNotCoercedNoDup()); + //stack.pop(); + //TestIncDec11 with result stack.push(new PreDecrementAVM2Item(ins, localData.lineStartInstruction, inside)); } else { stack.addToOutput(new PostDecrementAVM2Item(ins, localData.lineStartInstruction, inside));