Skip to content

Decompile revision 0xA changes for wireless_communication_status without fakematch#744

Open
LumioseSil wants to merge 5 commits into
pret:masterfrom
LumioseSil:fixthematch
Open

Decompile revision 0xA changes for wireless_communication_status without fakematch#744
LumioseSil wants to merge 5 commits into
pret:masterfrom
LumioseSil:fixthematch

Conversation

@LumioseSil
Copy link
Copy Markdown
Contributor

So one of the emerald UBFixes mentions that 0xFF can happen, and mentions that GROUPTYPE_NONE is 0xFF, and shouldn't be used as an index into groupCounts. It mentions that int theory the only activity with this group type (ACTIVITY_SEARCH) wouldn't satisfy the condition below, but not necessarily.

Well, revision A of FRLG fixes this but has an even broader check, by skipping ALL invalid values by adding a range check. For this reason, I have also opted to do || UBFIX.

@LumioseSil LumioseSil force-pushed the fixthematch branch 2 times, most recently from f461b71 to 976776a Compare March 24, 2026 02:33
…tatus

So one of the emerald UBFixes mentions that 0xFF can happen, and mentions that GROUPTYPE_NONE is 0xFF, and shouldn't be used as an index into groupCounts. It mentions that int theory the only activity with this group type (ACTIVITY_SEARCH) wouldn't satisfy the condition below, but not necessarily.

Well, revision A of FRLG fixes this but has an even broader check, by skipping ALL invalid values by adding a range check. For this reason, I have also opted to do || UBFIX.
@LumioseSil LumioseSil changed the title Fix fake match introduced by Revision 0xA in wireless_communication_status Decompile revision A changes for wireless_communication_status without fakematch Apr 2, 2026
@LumioseSil LumioseSil changed the title Decompile revision A changes for wireless_communication_status without fakematch Decompile revision 0xA changes for wireless_communication_status without fakematch Apr 2, 2026
@LumioseSil
Copy link
Copy Markdown
Contributor Author

Ping?

@LumioseSil
Copy link
Copy Markdown
Contributor Author

Ping.

@LumioseSil
Copy link
Copy Markdown
Contributor Author

Whole 0xA version should be UBFix because none of this seems emulation related and Nintendo wouldn't change a line of code without a reason.

@LumioseSil
Copy link
Copy Markdown
Contributor Author

Also said change fixes a UB reported in emerald for this same function in Union room.

@LumioseSil
Copy link
Copy Markdown
Contributor Author

Ping. Basically this is the most important PR.

@LumioseSil
Copy link
Copy Markdown
Contributor Author

Out of all the others I submitted I mean.

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.

1 participant