Fix some UB exposed with GCC 10.1.0
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user