fixed crash with related to player count

This commit is contained in:
Magnus Auvinen 2010-05-29 11:12:52 +00:00
parent 9f88ec55fe
commit 6ff27c56e8

View file

@ -881,7 +881,7 @@ void CClient::ProcessPacket(CNetChunk *pPacket)
Info.m_MaxPlayers = str_toint(Up.GetString()); Info.m_MaxPlayers = str_toint(Up.GetString());
// don't add invalid info to the server browser list // don't add invalid info to the server browser list
if(Info.m_NumPlayers > MAX_CLIENTS || Info.m_MaxPlayers > MAX_CLIENTS) if(Info.m_NumPlayers < 0 || Info.m_NumPlayers > MAX_CLIENTS || Info.m_MaxPlayers < 0 || Info.m_MaxPlayers > MAX_CLIENTS)
return; return;
str_format(Info.m_aAddress, sizeof(Info.m_aAddress), "%d.%d.%d.%d:%d", str_format(Info.m_aAddress, sizeof(Info.m_aAddress), "%d.%d.%d.%d:%d",