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())