diff --git a/src/wireless_communication_status_screen.c b/src/wireless_communication_status_screen.c index 693e22052..793c589d2 100644 --- a/src/wireless_communication_status_screen.c +++ b/src/wireless_communication_status_screen.c @@ -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)