Skip to content

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

Open
AZero13 wants to merge 1 commit into
pret:masterfrom
AZero13:emerald-stuff
Open

Edit NUM_GROUPTYPES UBFIX by mirroring Nintendo's FRLG Fix#2252
AZero13 wants to merge 1 commit into
pret:masterfrom
AZero13:emerald-stuff

Conversation

@AZero13

@AZero13 AZero13 commented Mar 24, 2026

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.

@AZero13

AZero13 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Ping

@AZero13

AZero13 commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

PR used for reference:

pret/pokefirered#744

@AZero13 AZero13 force-pushed the emerald-stuff branch 2 times, most recently from e5eed27 to 2bbf85c Compare June 7, 2026 18:01
@AZero13 AZero13 changed the title Edit NUM_GROUPTYPES UBFIX by mirroring Nintendo's FRLG Fix. Edit NUM_GROUPTYPES UBFIX by mirroring Nintendo's FRLG Fix Jun 7, 2026
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