mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
str_truncate instead of str_copy
This commit is contained in:
parent
bb2f446802
commit
9b810017e1
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue