Skip to content

Commit 75618cb

Browse files
author
Gin
committed
fix build
1 parent 060dfbb commit 75618cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SerialPrograms/Source/Pokemon/Pokemon_CollectedPokemonInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ std::ostream& operator<<(std::ostream& os, const std::optional<CollectedPokemonI
103103

104104
std::string create_overlay_info(const CollectedPokemonInfo& pokemon){
105105
const std::string& display_name = get_pokemon_name(pokemon.name_slug).display_name();
106-
char dex_str[5];
106+
char dex_str[7]; // leaving enough space to convert dex number uint16_t to string with "0" to fill up at least 4 characters, e.g. "0005"
107107
snprintf(dex_str, sizeof(dex_str), "%04d", pokemon.dex_number);
108108
std::string overlay_log = std::string(dex_str) + " " + display_name;
109109
if(pokemon.gender == StatsHuntGenderFilter::Male){

0 commit comments

Comments
 (0)