From 058e832d161953b9095cab1001bab39ffed9a9fd Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 25 Sep 2007 15:14:29 +0000 Subject: [PATCH] fixed an indexing error in amb967 --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401477 --- core/smn_entities.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/smn_entities.cpp b/core/smn_entities.cpp index 74ad3797..dd69c267 100644 --- a/core/smn_entities.cpp +++ b/core/smn_entities.cpp @@ -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())