Removed potential integer overflow.
If the number passed into max is Integer.MAX_VALUE, like it is with
ChoiceOfDamnation, the random number will overflow. So let's not do
that.
@@ -1543,7 +1543,7 @@ public class ComputerPlayer extends PlayerImpl implements Player {
}
//TODO: improve this
if (min < max && min == 0) {
- return RandomUtil.nextInt(max + 1);
+ return RandomUtil.nextInt(max);
}
return min;
}
