From 19e9f4e2fb860187b37251dbdb03d51fdca17108 Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Fri, 11 Sep 2015 11:08:35 +0100 Subject: [PATCH] Only clear the error string if none is given --- src/engine/shared/network_conn.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/engine/shared/network_conn.cpp b/src/engine/shared/network_conn.cpp index f52684b49..e68ef5abe 100644 --- a/src/engine/shared/network_conn.cpp +++ b/src/engine/shared/network_conn.cpp @@ -206,9 +206,12 @@ void CNetConnection::Disconnect(const char *pReason) else SendControl(NET_CTRLMSG_CLOSE, 0, 0); - m_ErrorString[0] = 0; - if(pReason && pReason != m_ErrorString) - str_copy(m_ErrorString, pReason, sizeof(m_ErrorString)); + if(pReason != m_ErrorString) + { + m_ErrorString[0] = 0; + if(pReason) + str_copy(m_ErrorString, pReason, sizeof(m_ErrorString)); + } } Reset();