diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 4cefaacc8..b01ec3600 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -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