mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fix rare StackOverflowError in DeclareCommands
This behavior is exhibited with the NanoLimbo software version 1.2.2.
This commit is contained in:
parent
1afa22d5cf
commit
9f4c2ce5fc
1 changed files with 5 additions and 0 deletions
|
@ -295,6 +295,11 @@ public class JavaDeclareCommandsTranslator extends PacketTranslator<ServerDeclar
|
|||
for (int paramID : paramNode.getChildIndices()) {
|
||||
CommandNode paramNode = allNodes[paramID];
|
||||
|
||||
if (paramNode == this.paramNode) {
|
||||
// Fixes a StackOverflowError when an argument has itself as a child
|
||||
continue;
|
||||
}
|
||||
|
||||
if (paramNode.getParser() == null) {
|
||||
boolean foundCompatible = false;
|
||||
for (int i = 0; i < children.size(); i++) {
|
||||
|
|
Loading…
Reference in a new issue