diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2020-07-11 10:22:34 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2020-07-11 10:22:34 -0400 |
commit | 535189bf14d73af495705e98e4795cda61994114 (patch) | |
tree | 454d2be7f4589b863b82ab64c65c0792b83f7c3d /src/pokedex.c | |
parent | 038d247e147eec5a3b59eb8272979a686fe5c646 (diff) |
Fix some UB exposed with GCC 10.1.0
Diffstat (limited to 'src/pokedex.c')
-rw-r--r-- | src/pokedex.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pokedex.c b/src/pokedex.c index d2e1a0666..0541f3f2e 100644 --- a/src/pokedex.c +++ b/src/pokedex.c @@ -4521,7 +4521,11 @@ static void UnusedPrintMonName(u8 windowId, const u8* name, u8 left, u8 top) ; for (i = 0; i < nameLength; i++) str[ARRAY_COUNT(str) - nameLength + i] = name[i]; +#ifdef UBFIX + str[ARRAY_COUNT(str) - 1] = EOS; +#else str[ARRAY_COUNT(str)] = EOS; +#endif PrintInfoSubMenuText(windowId, str, left, top); } |