str_truncate instead of str_copy

This commit is contained in:
Dennis Felsing 2020-10-26 12:49:19 +01:00
parent bb2f446802
commit 9b810017e1

View file

@ -2960,7 +2960,7 @@ int CGameContext::MapScan(const char *pName, int IsDir, int DirType, void *pUser
CMapNameItem Item;
int Length = str_length(pName);
str_copy(Item.m_aName, pName, minimum(static_cast<int>(sizeof(Item.m_aName)), Length - 3));
str_truncate(Item.m_aName, sizeof(Item.m_aName), pName, Length - 4);
pMapList->add(Item);
return 0;