mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-29 18:34:42 +00:00
fix
This commit is contained in:
@@ -289,12 +289,29 @@ public class ActionDeobfuscator extends ActionDeobfuscatorSimple {
|
||||
return;
|
||||
}
|
||||
|
||||
String variableName = stack.peek().getResult().toString();
|
||||
GraphTargetItem variableNameObj = stack.peek();
|
||||
if (!(variableNameObj instanceof DirectValueActionItem)) {
|
||||
// avoid dynamic variable names, for example: eval("item" add i);
|
||||
break;
|
||||
}
|
||||
|
||||
String variableName = variableNameObj.getResult().toString();
|
||||
if (!localData.variables.containsKey(variableName)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (action instanceof ActionSetVariable) {
|
||||
if (stack.size() < 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(stack.peek(2) instanceof DirectValueActionItem)) {
|
||||
// avoid dynamic variable names, for example: set("item" add i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (action instanceof ActionCallFunction) {
|
||||
if (stack.isEmpty()) {
|
||||
return;
|
||||
@@ -370,28 +387,6 @@ public class ActionDeobfuscator extends ActionDeobfuscatorSimple {
|
||||
break;
|
||||
}
|
||||
|
||||
if (action instanceof ActionGetVariable) {
|
||||
if (stack.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (stack.peek() instanceof DirectValueActionItem) {
|
||||
// avoid dynamic variable names, for example: eval("item" add i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (action instanceof ActionSetVariable) {
|
||||
if (stack.size() < 2) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (stack.peek(2) instanceof DirectValueActionItem) {
|
||||
// avoid dynamic variable names, for example: set("item" add i, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (action instanceof ActionPush) {
|
||||
ActionPush push = (ActionPush) action;
|
||||
boolean ok = true;
|
||||
|
||||
Reference in New Issue
Block a user