mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 14:38:18 +00:00
fix: NumClient > MaxClients is invalid
This commit is contained in:
parent
321819d743
commit
16f608ab91
|
@ -859,7 +859,7 @@ int CClient::UnpackServerInfo(CUnpacker *pUnpacker, CServerInfo *pInfo, int *pTo
|
|||
pInfo->m_NumBotSpectators = 0;
|
||||
|
||||
// don't add invalid info to the server browser list
|
||||
if(pInfo->m_NumClients < 0 || pInfo->m_NumClients > MAX_CLIENTS || pInfo->m_MaxClients < 0 || pInfo->m_MaxClients > MAX_CLIENTS ||
|
||||
if(pInfo->m_NumClients < 0 || pInfo->m_NumClients > pInfo->m_MaxClients || pInfo->m_MaxClients < 0 || pInfo->m_MaxClients > MAX_CLIENTS ||
|
||||
pInfo->m_NumPlayers < 0 || pInfo->m_NumPlayers > pInfo->m_NumClients || pInfo->m_MaxPlayers < 0 || pInfo->m_MaxPlayers > pInfo->m_MaxClients)
|
||||
return -1;
|
||||
// drop standard gametype with more than MAX_PLAYERS
|
||||
|
|
Loading…
Reference in a new issue