diff --git a/trunk/src/com/jpexs/asdec/abc/avm2/AVM2Code.java b/trunk/src/com/jpexs/asdec/abc/avm2/AVM2Code.java index 38ab0d706..ed541e10c 100644 --- a/trunk/src/com/jpexs/asdec/abc/avm2/AVM2Code.java +++ b/trunk/src/com/jpexs/asdec/abc/avm2/AVM2Code.java @@ -1542,9 +1542,15 @@ public class AVM2Code { } } if (!isKilled(reg, 0, end)) { - TreeItem v = (TreeItem) stack.pop(); - stack.push(new LocalRegTreeItem(ins, reg, v)); - stack.push(v); + for (int i = ip; i >= start; i--) { + if (code.get(i).definition instanceof DupIns) { + TreeItem v = (TreeItem) stack.pop(); + stack.push(new LocalRegTreeItem(ins, reg, v)); + stack.push(v); + } else { + break; + } + } } else { ins.definition.translate(isStatic, classIndex, localRegs, stack, scopeStack, constants, ins, method_info, output, body, abc, localRegNames, fullyQualifiedNames); }