[P1 Bug] Fix party UI crash from unsanitized lastCursor

This commit is contained in:
Michael Li 2024-10-16 10:20:47 -04:00
parent d01d856898
commit 431d6d384f

View File

@ -671,6 +671,9 @@ export default class PartyUiHandler extends MessageUiHandler {
} else if (this.cursor === 6) {
this.partyCancelButton.select();
}
if (this.lastCursor < 6 && this.lastCursor >= party.length) {
this.lastCursor = party.length - 1;
}
for (const p in party) {
const slotIndex = parseInt(p);