Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
lscgh committed Jan 25, 2024
1 parent d39d5a3 commit f64c89f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,11 @@ public GameConfig createGameConfigFromCommand(Player mainPlayer, String args[])

for(int i = 1; i < 5; i++) {
try {
integerArguments[i - 1] = Integer.parseInt(args[i]);
if(args.length <= i) {
integerArguments[i - 1] = i == 2 ? 1 : 3;
} else {
integerArguments[i - 1] = Integer.parseInt(args[i]);
}
} catch(NumberFormatException e) {
throw e;
}
Expand Down

0 comments on commit f64c89f

Please sign in to comment.