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 9ae54e349..dba2f2b40 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 @@ -861,11 +861,11 @@ public class ABC { if (getNamespaceMap().containsKey(value)) { return getNamespaceMap().get(value); } else { - String ns = getDeobfuscation().builtInNs(value); + DottedChain ns = getDeobfuscation().builtInNs(value); if (ns == null) { return new DottedChain(""); } else { - return new DottedChain(ns); + return ns; } } } 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 e988dcb21..004cf9f15 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 @@ -17,6 +17,7 @@ package com.jpexs.decompiler.flash.abc.avm2; import com.jpexs.decompiler.flash.abc.RenameType; +import com.jpexs.decompiler.graph.DottedChain; import java.util.HashMap; import java.util.Locale; import java.util.Map; @@ -91,15 +92,15 @@ public class AVM2Deobfuscation { return isValid; } - public String builtInNs(String ns) { + public DottedChain builtInNs(String ns) { if (ns == null) { return null; } if (ns.equals("http://www.adobe.com/2006/actionscript/flash/proxy")) { - return "flash.utils.flash_proxy"; + return new DottedChain("flash", "utils", "flash_proxy"); } if (ns.equals("http://adobe.com/AS3/2006/builtin")) { - return "-"; + return new DottedChain("-"); } return null; } diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java index 4f419cc1f..6b3c8c0b6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/abc/types/traits/Trait.java @@ -25,6 +25,7 @@ import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode; import com.jpexs.decompiler.flash.helpers.GraphTextWriter; import com.jpexs.decompiler.flash.helpers.NulWriter; import com.jpexs.decompiler.flash.tags.ABCContainerTag; +import com.jpexs.decompiler.graph.DottedChain; import com.jpexs.helpers.Helper; import java.io.Serializable; import java.util.List; @@ -78,7 +79,8 @@ public abstract class Trait implements Cloneable, Serializable { if (m.namespace_index == -1) { break; } - nsname = abcTag.getABC().nsValueToName(abc.constants.getNamespace(m.namespace_index).getName(abc.constants, true)).getLast(); + DottedChain dc = abcTag.getABC().nsValueToName(abc.constants.getNamespace(m.namespace_index).getName(abc.constants, true)); + nsname = dc.getLast(); if (nsname == null) { break; @@ -90,14 +92,6 @@ public abstract class Trait implements Cloneable, Serializable { Namespace ns = m.getNamespace(abc.constants); - if (nsname.isEmpty() || (nsname.equals("-"))) { - if (ns != null) { - if (ns.kind == Namespace.KIND_NAMESPACE) { - nsname = ns.getName(abc.constants, true); - } - } - } - if (nsname != null) { String identifier = IdentifiersDeobfuscation.printIdentifier(true, nsname); if (identifier != null && !identifier.isEmpty()) {