mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- "Index out of bounds" error prevention in Gauntlet mode.
This commit is contained in:
@@ -49,13 +49,14 @@ public class GauntletWinLose extends ControlWinLose {
|
||||
@Override
|
||||
public void run() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < len; i++) {
|
||||
if (i <= num) {
|
||||
sb.append((i + 1) + ". " + lstEventNames.get(i)
|
||||
+ " (" + lstEventRecords.get(i) + ")\n");
|
||||
}
|
||||
else {
|
||||
sb.append((i + 1) + ". ??????\n");
|
||||
if (!lstEventNames.isEmpty()) {
|
||||
for (int i = 0; i < len; i++) {
|
||||
if (i <= num) {
|
||||
sb.append((i + 1) + ". " + lstEventNames.get(i)
|
||||
+ " (" + lstEventRecords.get(i) + ")\n");
|
||||
} else {
|
||||
sb.append((i + 1) + ". ??????\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user