From fbdbc33f378814444fe0e5621dab9db77278853a Mon Sep 17 00:00:00 2001 From: ghoulslash Date: Sun, 27 Jun 2021 07:42:55 -0600 Subject: [PATCH] fix dexnav headerId overflow issue --- src/dexnav.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/dexnav.c b/src/dexnav.c index e03b86d11d..c500cdcb14 100644 --- a/src/dexnav.c +++ b/src/dexnav.c @@ -1730,7 +1730,7 @@ static void CreateNoDataIcon(s16 x, s16 y) CreateSprite(&sNoDataIconTemplate, x, y, 0); } -static bool8 CapturedAllLandMons(u8 headerId) +static bool8 CapturedAllLandMons(u16 headerId) { u16 i, species; int count = 0; @@ -1762,7 +1762,7 @@ static bool8 CapturedAllLandMons(u8 headerId) } //Checks if all Pokemon that can be encountered while surfing have been capture -static bool8 CapturedAllWaterMons(u8 headerId) +static bool8 CapturedAllWaterMons(u16 headerId) { u32 i; u16 species; @@ -1793,7 +1793,7 @@ static bool8 CapturedAllWaterMons(u8 headerId) return FALSE; } -static bool8 CapturedAllHiddenMons(u8 headerId) +static bool8 CapturedAllHiddenMons(u16 headerId) { u32 i; u16 species; @@ -1826,7 +1826,7 @@ static bool8 CapturedAllHiddenMons(u8 headerId) static void DexNavLoadCapturedAllSymbols(void) { - u8 headerId = GetCurrentMapWildMonHeaderId(); + u16 headerId = GetCurrentMapWildMonHeaderId(); LoadCompressedSpriteSheetUsingHeap(&sCapturedAllPokemonSpriteSheet); @@ -2518,7 +2518,7 @@ bool8 TryFindHiddenPokemon(void) if ((*stepPtr) == 0 && (Random() % 100 < HIDDEN_MON_SEARCH_RATE)) { // hidden pokemon - u8 headerId = GetCurrentMapWildMonHeaderId(); + u16 headerId = GetCurrentMapWildMonHeaderId(); u8 index; u16 species; u8 environment;