mirror of
https://github.com/pret/pokefirered.git
synced 2026-09-30 04:48:36 -05:00
another emerald UB
This commit is contained in:
@@ -381,6 +381,13 @@ static u32 CountPlayersInGroupAndGetActivity(struct RfuPlayer * player, u32 * gr
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sActivityGroupInfo); i++)
|
||||
{
|
||||
#ifdef UBFIX
|
||||
// GROUPTYPE_NONE is 0xFF, and shouldn't be used as an index into groupCounts.
|
||||
// In theory the only activity with this group type (ACTIVITY_SEARCH) wouldn't
|
||||
// satisfy the condition below, but not necessarily.
|
||||
if (group_type(i) == GROUPTYPE_NONE)
|
||||
continue;
|
||||
#endif
|
||||
if (activity == group_activity(i) && player->groupScheduledAnim == UNION_ROOM_SPAWN_IN)
|
||||
{
|
||||
if (group_players(i) == 0)
|
||||
|
||||
Reference in New Issue
Block a user