Skip to content

Fix softlock on modern when selecting "Team" from menu#478

Merged
AnonymousRandomPerson merged 1 commit intopret:masterfrom
evanc577:friend-list-modern-softlock
Apr 29, 2026
Merged

Fix softlock on modern when selecting "Team" from menu#478
AnonymousRandomPerson merged 1 commit intopret:masterfrom
evanc577:friend-list-modern-softlock

Conversation

@evanc577
Copy link
Copy Markdown
Contributor

With modern compiler, the sFriendList variable is placed directly after gUnknown_3000E94 in memory.

sub_80089AC(), which appears to draw the background for windows, does incorrect bounds checking, which can cause it to overflow the gUnknown_3000E94 array. This is problematic for the end of dungeon window, which scrolls up from the bottom of the screen, guaranteeing an overflow. After the overflow, sFriendList is overwritten and upon trying to open the "Team" menu, the game softlocks.

Softlock repro steps:

  1. Start game
  2. Enter a dungeon
  3. Select give up from menu
  4. After waking up, open menu and select "Team", game softlocks

Copy link
Copy Markdown
Collaborator

@AnonymousRandomPerson AnonymousRandomPerson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very interesting, thanks for investigating!

@AnonymousRandomPerson AnonymousRandomPerson merged commit 808ad38 into pret:master Apr 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants