fixed an indexing error in amb967
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401477
This commit is contained in:
parent
4974c11766
commit
058e832d16
@ -51,7 +51,7 @@ inline edict_t *GetEdict(cell_t num)
|
|||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (num > 0 && num < g_Players.GetMaxClients())
|
if (num > 0 && num <= g_Players.GetMaxClients())
|
||||||
{
|
{
|
||||||
CPlayer *pPlayer = g_Players.GetPlayerByIndex(num);
|
CPlayer *pPlayer = g_Players.GetPlayerByIndex(num);
|
||||||
if (!pPlayer || !pPlayer->IsConnected())
|
if (!pPlayer || !pPlayer->IsConnected())
|
||||||
@ -69,7 +69,7 @@ inline edict_t *GetEntity(cell_t num, CBaseEntity **pData)
|
|||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (num > 0 && num < g_Players.GetMaxClients())
|
if (num > 0 && num <= g_Players.GetMaxClients())
|
||||||
{
|
{
|
||||||
CPlayer *pPlayer = g_Players.GetPlayerByIndex(num);
|
CPlayer *pPlayer = g_Players.GetPlayerByIndex(num);
|
||||||
if (!pPlayer || !pPlayer->IsConnected())
|
if (!pPlayer || !pPlayer->IsConnected())
|
||||||
|
Loading…
Reference in New Issue
Block a user