mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
fix possible NPE in AF_ChooseNumber
This commit is contained in:
@@ -823,7 +823,7 @@ public class AbilityFactory_Choose {
|
|||||||
HashMap<String, String> params = af.getMapParams();
|
HashMap<String, String> params = af.getMapParams();
|
||||||
Card card = af.getHostCard();
|
Card card = af.getHostCard();
|
||||||
int min = params.containsKey("Min") ? Integer.parseInt(params.get("Min")) : 0;
|
int min = params.containsKey("Min") ? Integer.parseInt(params.get("Min")) : 0;
|
||||||
int max = Integer.parseInt(params.get("Max"));
|
int max = params.containsKey("Max") ? Integer.parseInt(params.get("Max")) : 99;
|
||||||
boolean random = params.containsKey("Random");
|
boolean random = params.containsKey("Random");
|
||||||
|
|
||||||
String[] choices = new String[max + 1];
|
String[] choices = new String[max + 1];
|
||||||
|
|||||||
Reference in New Issue
Block a user