mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
FIXED bug in CardStorageReader to support numbers in card names w/ lazy card loading
Borrowing 100,000 Arrows was the driver test case
This commit is contained in:
@@ -138,10 +138,13 @@ public class CardStorageReader {
|
|||||||
if (c == '\'') {
|
if (c == '\'') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (c < 'a' || c > 'z') {
|
if ((c < 'a' || c > 'z') && (c < '0' || c > '9')) {
|
||||||
if (charIndex > 0 && chars[charIndex - 1] == '_') {
|
if (charIndex > 0 && chars[charIndex - 1] == '_') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
// Comma separator in numbers: "Borrowing 100,000 Arrows"
|
||||||
|
if ((c == ',') && (charIndex > 0) && (chars[charIndex-1] >= '0' || chars[charIndex-1] <= '9'))
|
||||||
|
continue;
|
||||||
c = '_';
|
c = '_';
|
||||||
}
|
}
|
||||||
chars[charIndex++] = c;
|
chars[charIndex++] = c;
|
||||||
|
|||||||
Reference in New Issue
Block a user