Fix assert hits when species are disabled (#9520)
Some checks failed
CI / build (push) Has been cancelled
CI / docs_validate (push) Has been cancelled
CI / allcontributors (push) Has been cancelled
Docs / deploy (push) Has been cancelled

This commit is contained in:
cawtds 2026-03-14 18:33:43 +01:00 committed by GitHub
parent 4c3ff3979c
commit c70b247579
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -1362,6 +1362,9 @@ static bool32 CheckBattlePyramidEvoRequirement(u16 species, const u16 *evoItems,
u32 i, j, k;
for (i = 0; i < NUM_SPECIES; i++)
{
if (!IsSpeciesEnabled(i))
continue;
const struct Evolution *evolutions = GetSpeciesEvolutions(i);
if (evolutions == NULL)
continue;

View File

@ -3352,6 +3352,9 @@ static u16 *MakeCaughtBannesSpeciesList(u32 totalBannedSpecies)
u16 *list = AllocZeroed(sizeof(u16) * totalBannedSpecies);
for (u32 i = 0; i < NUM_SPECIES; i++)
{
if (!IsSpeciesEnabled(i))
continue;
u32 baseSpecies = GET_BASE_SPECIES_ID(i);
if (baseSpecies == i && gSpeciesInfo[baseSpecies].isFrontierBanned)
{