mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34: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())
|
if(RconAuthed())
|
||||||
return;
|
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);
|
CMsgPacker Msg(NETMSG_RCON_AUTH);
|
||||||
Msg.AddString(pName, 32);
|
Msg.AddString(pName, 32);
|
||||||
|
|
Loading…
Reference in a new issue