From 4d4ca347d2418797c8a872156f79788fff017f9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sun, 18 Sep 2016 00:05:21 +0200 Subject: [PATCH] Fixed deobfuscation in toplevel --- .../jpexs/decompiler/flash/IdentifiersDeobfuscation.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/IdentifiersDeobfuscation.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/IdentifiersDeobfuscation.java index 943468d12..a1288fddf 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/IdentifiersDeobfuscation.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/IdentifiersDeobfuscation.java @@ -227,8 +227,8 @@ public class IdentifiersDeobfuscation { name = changedName; } if (changed) { - String newClassName = ""; - if (pkg == null) { + String newClassName; + if ((pkg == null) || (pkg.isEmpty()) || (pkg.isTopLevel())) { newClassName = name; } else { newClassName = pkg + "." + name; @@ -283,7 +283,6 @@ public class IdentifiersDeobfuscation { } public String deobfuscateName(boolean as3, String s, boolean firstUppercase, String usageType, HashMap namesMap, RenameType renameType, Map selected) { - boolean isValid = true; if (usageType == null) { usageType = "name"; } @@ -295,7 +294,7 @@ public class IdentifiersDeobfuscation { } } - isValid = isValidName(as3, s); + boolean isValid = isValidName(as3, s); if (!isValid) { if (namesMap.containsKey(sChain)) { return namesMap.get(sChain).toRawString();