Fix bug and make unknown move (or moveIndex 0) return an empty string in getMoveString()

This commit is contained in:
risingPhil 2024-08-13 20:56:50 +02:00
parent 0fd91fb8e5
commit 47ec404aac
2 changed files with 2 additions and 2 deletions

View File

@ -507,6 +507,6 @@ const char *getMoveString(Move move)
case Move::BEAT_UP:
return "Beat Up";
default:
return "Unknown move";
return "";
}
}

View File

@ -432,7 +432,7 @@ bool gen2_isPokemonShiny(Gen2TrainerPokemon& poke)
// based on https://bulbapedia.bulbagarden.net/wiki/Shiny_Pok%C3%A9mon#Determining_Shininess
const PokeStat statsToCheckFor10[] = {PokeStat::SPEED, PokeStat::DEF, PokeStat::SPECIAL};
for(uint8_t i=0; i < sizeof(statsToCheckFor10); ++i)
for(uint8_t i=0; i < (sizeof(statsToCheckFor10) / sizeof(statsToCheckFor10[0])); ++i)
{
if(getStatIV(statsToCheckFor10[i], poke.iv_data) != 10)
{