From e6be500c464ec8de3273fa57802c8321a1fa3026 Mon Sep 17 00:00:00 2001 From: IotaBread Date: Thu, 4 Jan 2024 22:40:01 -0300 Subject: [PATCH] Fix an inverted condition --- .../src/main/java/org/quiltmc/enigma/command/Command.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/enigma-cli/src/main/java/org/quiltmc/enigma/command/Command.java b/enigma-cli/src/main/java/org/quiltmc/enigma/command/Command.java index a8f6ef0ce..6c37b57f5 100644 --- a/enigma-cli/src/main/java/org/quiltmc/enigma/command/Command.java +++ b/enigma-cli/src/main/java/org/quiltmc/enigma/command/Command.java @@ -123,7 +123,7 @@ public static Enigma createEnigma() { * @return the argument, as a string */ protected String getArg(String[] args, int index) { - if (index >= args.length || index >= this.allArguments.size()) { + if (index < args.length && index < this.allArguments.size()) { return getArg(args, index, this.allArguments.get(index)); } else { throw new RuntimeException("arg index is outside of range of possible arguments! (index: " + index + ", allowed arg count: " + this.allArguments.size() + ")");