fix possible NPE in AF_ChooseNumber

This commit is contained in:
slapshot5
2011-10-17 02:58:30 +00:00
parent 217fc960d5
commit 698bec15e1

View File

@@ -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];