From ae37812b82f07e9d6c4929ca6e885dff22389728 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Fri, 6 Oct 2023 09:43:08 +0200 Subject: [PATCH] Fixed #2094 AS3 missing star type on var and const --- CHANGELOG.md | 1 + .../decompiler/flash/abc/types/traits/TraitSlotConst.java | 8 +++----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9b81c4e0..e85368551 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file. - [#1678] Shapes - Miter clip join style - [#2094] AS3 do not show body trait variables as FQN - [#2094] AS3 Missing use namespace +- [#2094] AS3 missing star type on var and const ## [19.0.0] - 2023-10-01 ### Added diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java index e3f90a0a2..ebacb63a9 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/TraitSlotConst.java @@ -90,22 +90,20 @@ public class TraitSlotConst extends Trait implements TraitWithSlot { public GraphTextWriter getNameStr(GraphTextWriter writer, ABC abc, List fullyQualifiedNames) { String typeStr = getType(abc.constants, fullyQualifiedNames); - if (typeStr.equals("*")) { - typeStr = ""; - } else { - typeStr = ":" + typeStr; - } ValueKind val = null; if (value_kind != 0) { val = new ValueKind(value_index, value_kind); } + typeStr = ":" + typeStr; + String slotconst = "var"; if (kindType == TRAIT_CONST) { slotconst = "const"; } if (val != null && val.isNamespace()) { slotconst = "namespace"; + typeStr = ""; } writer.hilightSpecial(slotconst + " ", HighlightSpecialType.TRAIT_TYPE); writer.hilightSpecial(getName(abc).getName(abc.constants, new ArrayList<>(), false, true), HighlightSpecialType.TRAIT_NAME);