mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 17:30:46 +00:00
Do not allow functions with empty names as commands
This commit is contained in:
+8
-2
@@ -104,8 +104,8 @@ public class NewFunctionAVM2Item extends AVM2Item {
|
||||
this.abc = abc;
|
||||
this.methodIndex = methodIndex;
|
||||
this.scopeStack = scopeStack;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
|
||||
if (localData.seenMethods.contains(methodIndex)) {
|
||||
@@ -177,4 +177,10 @@ public class NewFunctionAVM2Item extends AVM2Item {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
//Assuming isEmpty is called only for commands = not in expressions
|
||||
//Do not allow functions with empty names as commands.
|
||||
return functionName.isEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user