Fix client crash due to truncated skin name

This commit is contained in:
Robert Müller 2024-03-03 18:18:49 +01:00 committed by Dennis Felsing
parent 653c5d07d4
commit 27f65cdbb0
3 changed files with 2 additions and 7 deletions

@ -1 +1 @@
Subproject commit 4d796ea119b52c8901286e14ab96faf7353a5d59 Subproject commit a4fbe0e52338a129bc3ac2e3a1de54de1d175279

View file

@ -6,7 +6,7 @@ class CTeeInfo
public: public:
constexpr static const float ms_DarkestLGT7 = 61 / 255.0f; constexpr static const float ms_DarkestLGT7 = 61 / 255.0f;
char m_aSkinName[64] = {'\0'}; char m_aSkinName[24] = {'\0'};
int m_UseCustomColor = 0; int m_UseCustomColor = 0;
int m_ColorBody = 0; int m_ColorBody = 0;
int m_ColorFeet = 0; int m_ColorFeet = 0;

View file

@ -101,13 +101,8 @@ public:
int ClientID = Item.m_ID; int ClientID = Item.m_ID;
if(ClientID < MAX_CLIENTS) if(ClientID < MAX_CLIENTS)
{ {
<<<<<<< HEAD
CClientData *pClient = &m_aClients[ClientID]; CClientData *pClient = &m_aClients[ClientID];
IntsToStr(&pInfo->m_Name0, 4, pClient->m_aName);
=======
CClientData *pClient = &m_aClients[ClientId];
int32_to_str(&pInfo->m_Name0, 4, pClient->m_aName, sizeof(pClient->m_aName)); int32_to_str(&pInfo->m_Name0, 4, pClient->m_aName, sizeof(pClient->m_aName));
>>>>>>> 1138e763b (Add validation for `StrToInts` and `IntsToStr`, move and rename)
} }
} }
} }