mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-13 06:28:17 +00:00
Fixed #1842 AS1/2 use parenthesis when initObject has nonstring keys
This commit is contained in:
@@ -63,8 +63,15 @@ public class InitObjectActionItem extends ActionItem {
|
||||
if (i < values.size() - 1) {
|
||||
writer.append(",");
|
||||
}
|
||||
//AS1/2 does not allow quotes in name here
|
||||
writer.append(IdentifiersDeobfuscation.printIdentifier(false, names.get(i).toStringNoQuotes(localData)));
|
||||
//AS1/2 does not allow quotes in name here
|
||||
if ((names.get(i) instanceof DirectValueActionItem)
|
||||
&&(((DirectValueActionItem)names.get(i)).isSimpleValue())) {
|
||||
writer.append(IdentifiersDeobfuscation.printIdentifier(false, names.get(i).toStringNoQuotes(localData)));
|
||||
} else {
|
||||
writer.append("(");
|
||||
names.get(i).appendTo(writer, localData);
|
||||
writer.append(")");
|
||||
}
|
||||
writer.append(":");
|
||||
if (values.get(i) instanceof TernarOpItem) { //Ternar operator contains ":"
|
||||
writer.append("(");
|
||||
|
||||
Reference in New Issue
Block a user