From 6905b2c70e375c344b70fd23c4c9f0c59ebbc1eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sun, 27 Oct 2024 15:04:13 +0100 Subject: [PATCH] Fixed: #2353 AS1/2 incorrect declaration propagation causing null assignments to registers --- CHANGELOG.md | 1 + .../src/com/jpexs/decompiler/flash/action/ActionGraph.java | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0accd2d27..5f3f16465 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,7 @@ All notable changes to this project will be documented in this file. - [#2354] Simplify expressions problems in some cases - [#2353] AS1/2 - fscommand and other dynamic GetURL related calls (decompilation + editation) - FFDec source code typos +- [#2353] AS1/2 incorrect declaration propagation causing null assignments to registers ## [21.1.1] - 2024-10-13 ### Added diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java index 6478dfe48..e998b13dd 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/action/ActionGraph.java @@ -614,7 +614,9 @@ public class ActionGraph extends Graph { ActionScript2ClassDetector detector = new ActionScript2ClassDetector(); detector.checkClass(uninitializedClassTraits, ret, ((ActionGraphSource) code).getVariables(), path); } - makeDefineRegistersUp(ret, new HashSet<>()); + ActionLocalData ald = (ActionLocalData) localData; + + makeDefineRegistersUp(ret, new HashSet<>(ald.regNames.keySet())); return ret; }