Merge pull request #478 from evanc577/friend-list-modern-softlock
Some checks are pending
GithubCI / build (push) Waiting to run

Fix softlock on modern when selecting "Team" from menu
This commit is contained in:
AnonymousRandomPerson 2026-04-29 00:36:44 -04:00 committed by GitHub
commit 808ad38ebe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1175,6 +1175,14 @@ void sub_80089AC(const WindowTemplate *r4, DungeonPos *r5_Str)
if (r8 > 160)
r8 = 160;
// BUG: The background array is 161 entries long, but this function will potentially write
// up to index 160 + 12 = 172, overflowing the array.
#ifdef BUGFIX
if (r5 > 160 - 12) {
r5 = 160 - 12;
}
#endif
for (i = 0; i < 4; i++) {
s32 id = r5 * 2;
if (r6[id] == 240 && r6[id + 1] == 240) {