mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- Fixed chooseNumber crashing when min > max.
This commit is contained in:
@@ -430,6 +430,9 @@ public class PlayerControllerHuman extends PlayerController {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int chooseNumber(SpellAbility sa, String title, int min, int max) {
|
public int chooseNumber(SpellAbility sa, String title, int min, int max) {
|
||||||
|
if (min >= max) {
|
||||||
|
return min;
|
||||||
|
}
|
||||||
final Integer[] choices = new Integer[max + 1 - min];
|
final Integer[] choices = new Integer[max + 1 - min];
|
||||||
for (int i = 0; i <= max - min; i++) {
|
for (int i = 0; i <= max - min; i++) {
|
||||||
choices[i] = Integer.valueOf(i + min);
|
choices[i] = Integer.valueOf(i + min);
|
||||||
|
|||||||
Reference in New Issue
Block a user