- "Index out of bounds" error prevention in Gauntlet mode.

This commit is contained in:
Agetian
2017-06-07 06:24:30 +00:00
parent b2461c73b0
commit bea2acbf29
2 changed files with 22 additions and 20 deletions

View File

@@ -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");
}
}
}