From 263ed337553f6ee0df444ab2233b7835421a6564 Mon Sep 17 00:00:00 2001 From: Eduardo Quezada D'Ottone Date: Mon, 26 Dec 2022 11:56:27 -0300 Subject: [PATCH] Fixed Eggs sometimes reading garbage graphic data. --- src/pokemon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pokemon.c b/src/pokemon.c index 8e8166fb3..7d121289e 100644 --- a/src/pokemon.c +++ b/src/pokemon.c @@ -8621,6 +8621,8 @@ void TrySpecialOverworldEvo(void) bool32 ShouldShowFemaleDifferences(u16 species, u32 personality) { + if (species >= NUM_SPECIES) + return FALSE; return (gSpeciesInfo[species].flags & SPECIES_FLAG_GENDER_DIFFERENCE) && GetGenderFromSpeciesAndPersonality(species, personality) == MON_FEMALE; }