Don't copy strings into themselves

This commit is contained in:
def 2017-06-02 18:37:29 +02:00
parent 533ae0aaf8
commit 814feede33

View file

@ -435,6 +435,7 @@ void CClient::RconAuth(const char *pName, const char *pPassword)
if(RconAuthed()) if(RconAuthed())
return; return;
if(pPassword != m_RconPassword)
str_copy(m_RconPassword, pPassword, sizeof(m_RconPassword)); str_copy(m_RconPassword, pPassword, sizeof(m_RconPassword));
CMsgPacker Msg(NETMSG_RCON_AUTH); CMsgPacker Msg(NETMSG_RCON_AUTH);