Skip to content

Commit

Permalink
Fix an inverted condition
Browse files Browse the repository at this point in the history
  • Loading branch information
IotaBread committed Jan 5, 2024
1 parent 8375cf7 commit e6be500
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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() + ")");
Expand Down

0 comments on commit e6be500

Please sign in to comment.