Fix for mana symbols indexoutofbounds exception

This commit is contained in:
spjspj 2018-03-19 21:16:32 +11:00
parent b046428f8c
commit de6eb6ece1

View file

@ -611,7 +611,7 @@ public final class ManaSymbols {
while (tok.hasMoreTokens()) { while (tok.hasMoreTokens()) {
String symbol = tok.nextToken(); String symbol = tok.nextToken();
Image image = sizedSymbols.get(symbol); Image image = sizedSymbols.get(symbol);
if (image == null && symbol != null) { if (image == null && symbol != null && symbol.length() == 2) {
String symbol2 = "" + symbol.charAt(1) + symbol.charAt(0); String symbol2 = "" + symbol.charAt(1) + symbol.charAt(0);
image = sizedSymbols.get(symbol2); image = sizedSymbols.get(symbol2);
} }