diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java index 114141351..9a35a9e62 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/avm2/graph/AVM2Graph.java @@ -492,7 +492,26 @@ public class AVM2Graph extends Graph { } dp = dp.nextParts.get(0); } - if (this.code.code.get(dp.start).definition instanceof PushIntegerTypeIns) { + + GraphPart numPart = dp; + AVM2Instruction ins = null; + Stack sstack = new Stack<>(); + do { + for (int n = 0; n < numPart.getHeight(); n++) { + ins = this.code.code.get(numPart.getPosAt(n)); + if (ins.definition instanceof LookupSwitchIns) { + break; + } + ins.translate(localData, sstack, new ArrayList(), staticOperation, path); + } + if (numPart.nextParts.size() > 1) { + break; + } else { + numPart = numPart.nextParts.get(0); + } + } while (!(this.code.code.get(numPart.end).definition instanceof LookupSwitchIns)); + GraphTargetItem nt = sstack.peek(); + if (nt instanceof IntegerValueAVM2Item) { hasDefault = true; } List caseValues = new ArrayList<>();