mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 01:20:43 +00:00
Square brackets is optional
This commit is contained in:
@@ -207,7 +207,11 @@ public abstract class AVM2Item extends GraphTargetItem {
|
||||
}
|
||||
} else {
|
||||
isValidName = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!Configuration.as3QNameObfuscatedPropsInSquareBrackets.get()) {
|
||||
isValidName = true;
|
||||
}
|
||||
|
||||
if (isValidName) {
|
||||
if (((FullMultinameAVM2Item) propertyName).name != null) {
|
||||
|
||||
+3
-2
@@ -20,6 +20,7 @@ import com.jpexs.decompiler.flash.IdentifiersDeobfuscation;
|
||||
import com.jpexs.decompiler.flash.abc.ABC;
|
||||
import com.jpexs.decompiler.flash.abc.avm2.AVM2ConstantPool;
|
||||
import com.jpexs.decompiler.flash.abc.types.Namespace;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode;
|
||||
import com.jpexs.decompiler.flash.helpers.GraphTextWriter;
|
||||
import com.jpexs.decompiler.flash.helpers.hilight.HighlightSpecialType;
|
||||
@@ -216,7 +217,7 @@ public class FullMultinameAVM2Item extends AVM2Item {
|
||||
String localName;
|
||||
boolean isAttribute = constants.getMultiname(multinameIndex).isAttribute();
|
||||
String namespaceSuffix = constants.getMultiname(multinameIndex).getNamespaceSuffix();
|
||||
if (!isAttribute && afterDot && namespaceSuffix.isEmpty()) {
|
||||
if (!isAttribute && afterDot && namespaceSuffix.isEmpty() && Configuration.as3QNameObfuscatedPropsInSquareBrackets.get()) {
|
||||
//do not deobfuscate
|
||||
localName = constants.getMultiname(multinameIndex).getNameAndCustomNamespace(new HashSet<>(), localData.abc, fullyQualifiedNames, true, true, customNsRef);
|
||||
} else {
|
||||
@@ -230,7 +231,7 @@ public class FullMultinameAVM2Item extends AVM2Item {
|
||||
writer.appendNoHilight("::");
|
||||
}
|
||||
|
||||
if (!isAttribute && afterDot && namespaceSuffix.isEmpty()) {
|
||||
if (!isAttribute && afterDot && namespaceSuffix.isEmpty() && Configuration.as3QNameObfuscatedPropsInSquareBrackets.get()) {
|
||||
if (IdentifiersDeobfuscation.isValidName(true, localName)) {
|
||||
writer.append(localName);
|
||||
} else {
|
||||
|
||||
@@ -1197,6 +1197,10 @@ public final class Configuration {
|
||||
@ConfigurationCategory("ui")
|
||||
public static ConfigurationItem<Boolean> showDebugListenInfo = null;
|
||||
|
||||
@ConfigurationDefaultBoolean(false)
|
||||
@ConfigurationCategory("script")
|
||||
public static ConfigurationItem<Boolean> as3QNameObfuscatedPropsInSquareBrackets = null;
|
||||
|
||||
private static Map<String, String> configurationDescriptions = new LinkedHashMap<>();
|
||||
private static Map<String, String> configurationTitles = new LinkedHashMap<>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user