mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-13 03:28:19 +00:00
Don't copy string when it's in the right position already
This commit is contained in:
parent
623223354a
commit
db4d472443
|
@ -190,7 +190,7 @@ void CNetConnection::Disconnect(const char *pReason)
|
||||||
SendControl(NET_CTRLMSG_CLOSE, 0, 0);
|
SendControl(NET_CTRLMSG_CLOSE, 0, 0);
|
||||||
|
|
||||||
m_ErrorString[0] = 0;
|
m_ErrorString[0] = 0;
|
||||||
if(pReason)
|
if(pReason && pReason != m_ErrorString)
|
||||||
str_copy(m_ErrorString, pReason, sizeof(m_ErrorString));
|
str_copy(m_ErrorString, pReason, sizeof(m_ErrorString));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue