fixed an indexing error in amb967

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401477
This commit is contained in:
David Anderson 2007-09-25 15:14:29 +00:00
parent 4974c11766
commit 058e832d16

View File

@ -51,7 +51,7 @@ inline edict_t *GetEdict(cell_t num)
{
return NULL;
}
if (num > 0 && num < g_Players.GetMaxClients())
if (num > 0 && num <= g_Players.GetMaxClients())
{
CPlayer *pPlayer = g_Players.GetPlayerByIndex(num);
if (!pPlayer || !pPlayer->IsConnected())
@ -69,7 +69,7 @@ inline edict_t *GetEntity(cell_t num, CBaseEntity **pData)
{
return NULL;
}
if (num > 0 && num < g_Players.GetMaxClients())
if (num > 0 && num <= g_Players.GetMaxClients())
{
CPlayer *pPlayer = g_Players.GetPlayerByIndex(num);
if (!pPlayer || !pPlayer->IsConnected())