mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 06:28:19 +00:00
Don't copy strings into themselves
This commit is contained in:
parent
533ae0aaf8
commit
814feede33
|
@ -435,7 +435,8 @@ void CClient::RconAuth(const char *pName, const char *pPassword)
|
|||
if(RconAuthed())
|
||||
return;
|
||||
|
||||
str_copy(m_RconPassword, pPassword, sizeof(m_RconPassword));
|
||||
if(pPassword != m_RconPassword)
|
||||
str_copy(m_RconPassword, pPassword, sizeof(m_RconPassword));
|
||||
|
||||
CMsgPacker Msg(NETMSG_RCON_AUTH);
|
||||
Msg.AddString(pName, 32);
|
||||
|
|
Loading…
Reference in a new issue