From 3538adedbc677540cb3c66f1215cd04b427ea50b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Wed, 21 Dec 2022 23:40:17 +0100 Subject: [PATCH] Fixed AS3 package level const with function value - separate P-code for trait and method --- CHANGELOG.md | 1 + .../jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4555b806..601a7a91a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ All notable changes to this project will be documented in this file. - [#1908] Slow commandline opening SWF - [#1908] Shape/image import must accept also filenames in the form "CHARID_xxx.ext" instead of just "CHARID.ext" - Exporting DefineJPEG3/4 with alpha channel to PNG produced JPEG instead +- AS3 package level const with function value - separate P-code for trait and method ### Changed - Warning before switching deobfuscation is now optional diff --git a/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java b/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java index 3b0523a85..1d9f74c7a 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java @@ -634,6 +634,10 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL if (currentTrait != null) { name += ":" + currentTrait.getName(abc).getName(abc.constants, null, false, true); } + + if (currentTrait instanceof TraitSlotConst) { + currentTrait = null; + } } displayMethod(pos, (int) tm.getProperties().index, name, currentTrait, lastTraitIndex, isStatic);