From 45a08c4cbb0f502f5c2a75bce16af74eeb7fe604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Thu, 4 Jul 2013 22:03:34 +0200 Subject: [PATCH] Issue #172 checkPrecoNextParts fix --- trunk/src/com/jpexs/decompiler/flash/action/ActionGraph.java | 2 +- trunk/src/com/jpexs/decompiler/flash/graph/Graph.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/trunk/src/com/jpexs/decompiler/flash/action/ActionGraph.java b/trunk/src/com/jpexs/decompiler/flash/action/ActionGraph.java index cf079ed2f..895f9c917 100644 --- a/trunk/src/com/jpexs/decompiler/flash/action/ActionGraph.java +++ b/trunk/src/com/jpexs/decompiler/flash/action/ActionGraph.java @@ -129,7 +129,7 @@ public class ActionGraph extends Graph { protected List checkPrecoNextParts(GraphPart part) { List items = getPartItems(part); part = makeMultiPart(part); - if (!items.isEmpty()) { + if (items.size() > 1) { if (items.get(items.size() - 1) instanceof ActionIf) { if (items.get(items.size() - 2) instanceof ActionStrictEquals) { List storeRegisters = new ArrayList<>(); diff --git a/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java b/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java index 8a5947469..97ce729f2 100644 --- a/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java +++ b/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java @@ -2311,7 +2311,10 @@ public class Graph { } } while (part != null); if (parts.size() > 1) { - return new GraphPartMulti(parts); + GraphPartMulti ret = new GraphPartMulti(parts); + ret.refs.addAll(parts.get(0).refs); + ret.nextParts.addAll(parts.get(parts.size() - 1).nextParts); + return ret; } else { return parts.get(0); }