Fix the strings length issue

This commit is contained in:
DizzyEggg
2018-09-01 22:03:21 +02:00
parent 5c7ca813e7
commit e28ce3be78
18 changed files with 58 additions and 58 deletions
+3 -3
View File
@@ -4112,7 +4112,7 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data)
{
retVal = 0;
while (retVal < OT_NAME_LENGTH)
while (retVal < PLAYER_NAME_LENGTH)
{
data[retVal] = boxMon->otName[retVal];
retVal++;
@@ -4480,7 +4480,7 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg)
case MON_DATA_OT_NAME:
{
s32 i;
for (i = 0; i < OT_NAME_LENGTH; i++)
for (i = 0; i < PLAYER_NAME_LENGTH; i++)
boxMon->otName[i] = data[i];
break;
}
@@ -6778,7 +6778,7 @@ s8 GetFlavorRelationByPersonality(u32 personality, u8 flavor)
bool8 IsTradedMon(struct Pokemon *mon)
{
u8 otName[OT_NAME_LENGTH + 1];
u8 otName[PLAYER_NAME_LENGTH + 1];
u32 otId;
GetMonData(mon, MON_DATA_OT_NAME, otName);
otId = GetMonData(mon, MON_DATA_OT_ID, 0);