Don't copy string when it's in the right position already

This commit is contained in:
def 2014-12-02 12:35:28 +01:00
parent 623223354a
commit db4d472443

View file

@ -190,7 +190,7 @@ void CNetConnection::Disconnect(const char *pReason)
SendControl(NET_CTRLMSG_CLOSE, 0, 0);
m_ErrorString[0] = 0;
if(pReason)
if(pReason && pReason != m_ErrorString)
str_copy(m_ErrorString, pReason, sizeof(m_ErrorString));
}