diff options
author | DizzyEggg <jajkodizzy@wp.pl> | 2018-09-01 22:03:21 +0200 |
---|---|---|
committer | DizzyEggg <jajkodizzy@wp.pl> | 2018-09-01 22:03:21 +0200 |
commit | e28ce3be7886eb38a29f1839a762598c8dfaec19 (patch) | |
tree | c135f1bec9fee34c4db04fbd214d9afcf65c4357 /src/battle_records.c | |
parent | 5c7ca813e75e6b87f1dc41e96aa55ebbbbc9e844 (diff) |
Fix the strings length issue
Diffstat (limited to 'src/battle_records.c')
-rw-r--r-- | src/battle_records.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/battle_records.c b/src/battle_records.c index 8e9d045cb..1680f3cc4 100644 --- a/src/battle_records.c +++ b/src/battle_records.c @@ -107,7 +107,7 @@ static s32 FindLinkBattleRecord(struct LinkBattleRecord *records, const u8 *name for (i = 0; i < LINK_B_RECORDS_COUNT; i++) { - if (!StringCompareN(records[i].name, name, OT_NAME_LENGTH) && records[i].trainerId == trainerId) + if (!StringCompareN(records[i].name, name, PLAYER_NAME_LENGTH) && records[i].trainerId == trainerId) return i; } @@ -198,7 +198,7 @@ static void UpdateLinkBattleRecords(struct LinkBattleRecords *records, const u8 { index = LINK_B_RECORDS_COUNT - 1; ClearLinkBattleRecord(&records->entries[index]); - StringCopyN(records->entries[index].name, name, OT_NAME_LENGTH); + StringCopyN(records->entries[index].name, name, PLAYER_NAME_LENGTH); records->entries[index].trainerId = trainerId; records->languages[index] = gLinkPlayers[battlerId].language; } |