diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java index 5db4e745d..c57d15399 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/ABC.java @@ -109,7 +109,7 @@ public class ABC { public ABCContainerTag parentTag; /* Map from multiname index of namespace value to namespace name**/ - private Map namespaceMap; + private Map namespaceMap; public ABC(ABCContainerTag tag) { this.parentTag = tag; @@ -814,15 +814,15 @@ public class ABC { } } - private Map getNamespaceMap() { + private Map getNamespaceMap() { if (namespaceMap == null) { - Map map = new HashMap<>(); + Map map = new HashMap<>(); for (ScriptInfo si : script_info) { for (Trait t : si.traits.traits) { if (t instanceof TraitSlotConst) { TraitSlotConst s = ((TraitSlotConst) t); if (s.isNamespace()) { - DottedChain key = constants.getNamespace(s.value_index).getName(constants); // assume not null + String key = constants.getNamespace(s.value_index).getName(constants).toRawString(); // assume not null DottedChain val = constants.getMultiname(s.name_index).getNameWithNamespace(constants); map.put(key, val); } @@ -858,10 +858,16 @@ public class ABC { } public DottedChain nsValueToName(DottedChain value) { - if (getNamespaceMap().containsKey(value)) { - return getNamespaceMap().get(value); + if (value == null) { + return null; + } + + String valueStr = value.toRawString(); + + if (getNamespaceMap().containsKey(valueStr)) { + return getNamespaceMap().get(valueStr); } else { - DottedChain ns = getDeobfuscation().builtInNs(value); + DottedChain ns = getDeobfuscation().builtInNs(valueStr); if (ns == null) { return DottedChain.EMPTY; } else { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Deobfuscation.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Deobfuscation.java index 9e5473d59..2589e03dc 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Deobfuscation.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/avm2/AVM2Deobfuscation.java @@ -96,13 +96,6 @@ public class AVM2Deobfuscation { return isValid; } - public DottedChain builtInNs(DottedChain ns) { - if (ns == null || ns.size() != 1) { - return null; - } - return builtInNs(ns.get(0)); - } - public DottedChain builtInNs(String ns) { if (ns == null) { return null;