Fix ArrayIndexOutOfBoundsException in transformName().

This commit is contained in:
Myrd
2016-11-06 18:05:05 +00:00
parent 1be16d69f9
commit 300895343b

View File

@@ -151,7 +151,7 @@ public class CardStorageReader {
continue; continue;
} }
if (c < 'a' || c > 'z') { if (c < 'a' || c > 'z') {
if (chars[charIndex - 1] == '_') { if (charIndex > 0 && chars[charIndex - 1] == '_') {
continue; continue;
} }
c = '_'; c = '_';