From 55a7112f105cd4b98a457c6b721ec4b406ca2cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 16 Mar 2024 09:59:45 +0100 Subject: [PATCH] Fixed #2207 AS - Index -2 out of bounds for some of the switches --- CHANGELOG.md | 2 ++ libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f53159d2..5447983f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ All notable changes to this project will be documented in this file. - Opening files with "Open with FFDec" on windows did not use same instance - [#2183] AS1/2 Direct editation - case sensitive identifiers since SWF version 7 - [#2203] GFX - DefineSubImage with TGA bitmapFormat +- [#2207] AS - Index -2 out of bounds for some of the switches ### Changed - [#2185] MochiCrypt no longer offered for auto decrypt, user needs to choose variant from "Use unpacker" menu @@ -3390,6 +3391,7 @@ Major version of SWF to XML export changed to 2. [#2177]: https://www.free-decompiler.com/flash/issues/2177 [#2183]: https://www.free-decompiler.com/flash/issues/2183 [#2203]: https://www.free-decompiler.com/flash/issues/2203 +[#2207]: https://www.free-decompiler.com/flash/issues/2207 [#2100]: https://www.free-decompiler.com/flash/issues/2100 [#2123]: https://www.free-decompiler.com/flash/issues/2123 [#2119]: https://www.free-decompiler.com/flash/issues/2119 diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java index f9cd69f2c..bcdfcc857 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/Graph.java @@ -936,7 +936,7 @@ public class Graph { } if (breakCount == 2) { - if (breakCaseIndex == 0) { + if (breakCaseIndex <= 0) { continue loopi; } if (swi.caseCommands.get(breakCaseIndex - 1).isEmpty()) {