From 2b8f708b0592ca6332a3047466d049d0166c813e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Fri, 22 Mar 2013 21:16:32 +0100 Subject: [PATCH] Issue #46 ifs with empty branches got ignored --- trunk/src/com/jpexs/decompiler/flash/graph/Graph.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java b/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java index c315287b1..761a16abc 100644 --- a/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java +++ b/trunk/src/com/jpexs/decompiler/flash/graph/Graph.java @@ -462,7 +462,13 @@ public class Graph { if (part.nextParts.size() == 2) { if (part.nextParts.get(0) == part.nextParts.get(1)) { if (!stack.isEmpty()) { - stack.pop(); + GraphTargetItem expr = stack.pop(); + if (expr instanceof LogicalOpItem) { + expr = ((LogicalOpItem) expr).invert(); + } else { + expr = new NotItem(null, expr); + } + output.add(new IfItem(null, expr, new ArrayList(), new ArrayList())); } part.nextParts.remove(0); }