From 205b9cda141f76cfc2dabef263f8a697b39c4adf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Thu, 25 Jan 2018 21:20:45 +0100 Subject: [PATCH] AS2 class detector - ignoring onFalse section, which can lead to invalid location --- .../flash/action/ActionScript2ClassDetector.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionScript2ClassDetector.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionScript2ClassDetector.java index 3eca2a6be..61117ef5a 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionScript2ClassDetector.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionScript2ClassDetector.java @@ -336,7 +336,13 @@ public class ActionScript2ClassDetector { try { if (!ifItem.onFalse.isEmpty()) { - throw new AssertException("else clause of the if is not empty"); + //throw new AssertException("else clause of the if is not empty"); + //Note: When there is an else block, it may mean + //that the class was too long to fit maximum of + //jump bytes so the jump target is other invalid location + //(usually negative - will probably lead to other SWF tags) + + //so we will rather silently ignore onFalse section } List classNamePath = pathToSearchInIfCond; @@ -667,11 +673,6 @@ public class ActionScript2ClassDetector { } } - //???? fid 963 - if (!ifItem.onFalse.isEmpty()) { - commands.addAll(pos + 1, ifItem.onFalse); - } - // goto next line and check next classes continue looppos; } catch (AssertException ex) {