about summary refs log tree commit diff
path: root/src/engine/client
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2010-05-29 11:12:52 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2010-05-29 11:12:52 +0000
commit6ff27c56e8805964c1c8c22d5b37effc3eb6ea9c (patch)
treec5f0f3752ec68f1f09646dec2a52728140a24973 /src/engine/client
parent9f88ec55fe9cd77e7ab2b552ec4085ceb5f016d3 (diff)
downloadzcatch-6ff27c56e8805964c1c8c22d5b37effc3eb6ea9c.tar.gz
zcatch-6ff27c56e8805964c1c8c22d5b37effc3eb6ea9c.zip
fixed crash with related to player count
Diffstat (limited to 'src/engine/client')
-rw-r--r--src/engine/client/client.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp
index dbcaa1ed..409d6969 100644
--- a/src/engine/client/client.cpp
+++ b/src/engine/client/client.cpp
@@ -881,7 +881,7 @@ void CClient::ProcessPacket(CNetChunk *pPacket)
 				Info.m_MaxPlayers = str_toint(Up.GetString());
 
 				// 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;
 
 				str_format(Info.m_aAddress, sizeof(Info.m_aAddress), "%d.%d.%d.%d:%d",