mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge pull request #668 from Learath2/dd_pr_chatoops
Fix array subscript below array bounds
This commit is contained in:
commit
7cc4f8bf48
|
@ -542,9 +542,9 @@ void CChat::AddLine(int ClientID, int Team, const char *pLine)
|
|||
str_copy(m_aLines[m_CurrentLine].m_aName, m_pClient->m_aClients[ClientID].m_aName, sizeof(m_aLines[m_CurrentLine].m_aName));
|
||||
|
||||
str_format(m_aLines[m_CurrentLine].m_aText, sizeof(m_aLines[m_CurrentLine].m_aText), ": %s", pLine);
|
||||
m_aLines[m_CurrentLine].m_Friend = m_pClient->m_aClients[ClientID].m_Friend;
|
||||
}
|
||||
|
||||
m_aLines[m_CurrentLine].m_Friend = m_pClient->m_aClients[ClientID].m_Friend;
|
||||
|
||||
char aBuf[1024];
|
||||
str_format(aBuf, sizeof(aBuf), "%s%s", m_aLines[m_CurrentLine].m_aName, m_aLines[m_CurrentLine].m_aText);
|
||||
|
|
Loading…
Reference in a new issue