Skip to content

Edit NUM_GROUPTYPES UBFIX by mirroring Nintendo's FRLG Fix.#2252

Open
SiliconA-Z wants to merge 1 commit intopret:masterfrom
SiliconA-Z:emerald-stuff
Open

Edit NUM_GROUPTYPES UBFIX by mirroring Nintendo's FRLG Fix.#2252
SiliconA-Z wants to merge 1 commit intopret:masterfrom
SiliconA-Z:emerald-stuff

Conversation

@SiliconA-Z
Copy link
Copy Markdown
Contributor

By doing type < NUM_GROUPTYPES, we ensure that the type is a valid index into groupCounts.

Yes, we break out early, but this is correct (and what FRLG revision A does anyway),:

sActivityGroupInfo is effectively a lookup table.

GROUPTYPE_NONE is only used for ACTIVITY_SEARCH.

That row should contribute nothing to groupCounts.

By doing type < NUM_GROUPTYPES, we ensure that the type is a valid index into groupCounts.
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