mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Improve assert
Fix assert condition where iSocket and GetAcceptedSocketCount are both 0.
This commit is contained in:
parent
13fcdaa442
commit
df81d52398
@ -548,7 +548,7 @@ void CRConServer::Disconnect(const int nIndex, const char* szReason) // NETMGR
|
||||
szReason = "unknown reason";
|
||||
}
|
||||
|
||||
DevMsg(eDLL_T::SERVER, "Connection to '%s' closed (%s)\n", netAdr.ToString(), szReason);
|
||||
DevMsg(eDLL_T::SERVER, "Connection to '%s' lost (%s)\n", netAdr.ToString(), szReason);
|
||||
m_nAuthConnections--;
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,8 @@ bool CL_NetConConnect(CNetConBase* pBase, const char* pHostAdr, const int nHostP
|
||||
CConnectedNetConsoleData* SH_GetNetConData(CNetConBase* pBase, const int iSocket)
|
||||
{
|
||||
const CSocketCreator* pCreator = pBase->GetSocketCreator();
|
||||
Assert(iSocket >= 0 && iSocket < pCreator->GetAcceptedSocketCount());
|
||||
Assert(iSocket >= 0 && (pCreator->GetAcceptedSocketCount() == 0
|
||||
|| iSocket < pCreator->GetAcceptedSocketCount()));
|
||||
|
||||
if (!pCreator->GetAcceptedSocketCount())
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user