mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-27 05:35:52 +00:00
Fixed #1840 AS3 - Allow to compile object literal keys with nonstring/numbers in obfuscated code
This commit is contained in:
@@ -26,6 +26,7 @@ All notable changes to this project will be documented in this file.
|
||||
- AS3 Direct editation - slow property resolving (Now up to 10 times faster compilation)
|
||||
- [#1875] Garbage collect SWF and its caches after closing it
|
||||
- [#1807] Proper parenthesis around call inside another call
|
||||
- [#1840] AS3 - Allow to compile object literal keys with nonstring/numbers in obfuscated code
|
||||
|
||||
### Changed
|
||||
- GFX - DefineExternalImage2 no longer handled as character
|
||||
@@ -2612,6 +2613,7 @@ All notable changes to this project will be documented in this file.
|
||||
[#1692]: https://www.free-decompiler.com/flash/issues/1692
|
||||
[#1757]: https://www.free-decompiler.com/flash/issues/1757
|
||||
[#1807]: https://www.free-decompiler.com/flash/issues/1807
|
||||
[#1840]: https://www.free-decompiler.com/flash/issues/1840
|
||||
[#1867]: https://www.free-decompiler.com/flash/issues/1867
|
||||
[#1868]: https://www.free-decompiler.com/flash/issues/1868
|
||||
[#1649]: https://www.free-decompiler.com/flash/issues/1649
|
||||
|
||||
@@ -46,8 +46,15 @@ public class NameValuePair extends AVM2Item {
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
boolean needsParents = !((name.getNotCoerced() instanceof NumberValueAVM2Item) || (name.getNotCoerced() instanceof StringAVM2Item)); // special for obfuscated strings
|
||||
if (needsParents) {
|
||||
writer.append("(");
|
||||
}
|
||||
name.toStringString(writer, localData);
|
||||
if (needsParents) {
|
||||
writer.append(")");
|
||||
}
|
||||
writer.append(":");
|
||||
if (value instanceof TernarOpItem) { //Ternar operator contains ":"
|
||||
writer.append("(");
|
||||
|
||||
@@ -2351,10 +2351,15 @@ public class ActionScript3Parser {
|
||||
lexer.pushback(s);
|
||||
}
|
||||
s = lex();
|
||||
expected(s, lexer.yyline(), SymbolGroup.IDENTIFIER, SymbolType.STRING, SymbolType.INTEGER, SymbolType.DOUBLE);
|
||||
expected(s, lexer.yyline(), SymbolGroup.IDENTIFIER, SymbolType.STRING, SymbolType.INTEGER, SymbolType.DOUBLE, SymbolType.PARENT_OPEN);
|
||||
|
||||
GraphTargetItem n = new StringAVM2Item(null, null, s.value.toString());
|
||||
//expression(allOpenedNamespaces, thisType,pkg,needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, allowRemainder, variables);
|
||||
GraphTargetItem n;
|
||||
if (s.type == SymbolType.PARENT_OPEN) { //special for obfuscated SWFs
|
||||
n = expression(allOpenedNamespaces, thisType,pkg,needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, allowRemainder, variables, false);
|
||||
expectedType(SymbolType.PARENT_CLOSE);
|
||||
} else {
|
||||
n = new StringAVM2Item(null, null, s.value.toString());
|
||||
}
|
||||
expectedType(SymbolType.COLON);
|
||||
GraphTargetItem v = expression(allOpenedNamespaces, thisType, pkg, needsActivation, importedClasses, openedNamespaces, registerVars, inFunction, inMethod, allowRemainder, variables, false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user