mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 10:48:00 +00:00
won't crash with empty strings
This commit is contained in:
@@ -1108,9 +1108,8 @@ public class CardFactoryUtil {
|
||||
*/
|
||||
public static int xCount(final Card c, final String expression) {
|
||||
int n = 0;
|
||||
|
||||
if (StringUtils.isNumeric(expression))
|
||||
return Integer.parseInt(expression);
|
||||
if (StringUtils.isBlank(expression)) return 0;
|
||||
if (StringUtils.isNumeric(expression)) return Integer.parseInt(expression);
|
||||
|
||||
final Player cardController = c.getController();
|
||||
final Player oppController = cardController.getOpponent();
|
||||
|
||||
Reference in New Issue
Block a user