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

View File

@@ -1076,8 +1076,8 @@ u16 BerryTypeToItemId(u16 berry)
void GetBerryNameByBerryType(u8 berry, u8 *string)
{
memcpy(string, GetBerryInfo(berry)->name, BERRY_NAME_COUNT - 1);
string[BERRY_NAME_COUNT - 1] = EOS;
memcpy(string, GetBerryInfo(berry)->name, BERRY_NAME_LENGTH);
string[BERRY_NAME_LENGTH] = EOS;
}
void GetBerryCountStringByBerryType(u8 berry, u8* dest, u32 berryCount)