Copy null terminator when decapping player name. (#4206)

This commit is contained in:
Ultimate_Bob 2024-02-18 20:24:21 +11:00 committed by GitHub
parent d102467d8d
commit d608af5662
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3208,7 +3208,7 @@ static const u8 *BattleStringGetPlayerName(u8 *text, u8 battler)
if (DECAP_ENABLED && !DECAP_NICKNAMES && toCpy != text && *toCpy != CHAR_FIXED_CASE)
{
*text = CHAR_FIXED_CASE;
StringCopyN(text+1, toCpy, PLAYER_NAME_LENGTH);
StringCopyN(text+1, toCpy, PLAYER_NAME_LENGTH + 1);
toCpy = text;
}