From dc73473394609f614c6e26e18296bb669113aa29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Gr=C3=BCnbacher?= Date: Mon, 11 May 2015 00:39:17 +0200 Subject: [PATCH] Engine: Fix CHECK_ENTITY() logic error (0 is not a player) --- modules/engine/engine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/engine/engine.h b/modules/engine/engine.h index 2ea243d8..e48d93bc 100644 --- a/modules/engine/engine.h +++ b/modules/engine/engine.h @@ -204,7 +204,7 @@ void StartFrame_Post(); MF_LogError(amx, AMX_ERR_NATIVE, "Entity out of range (%d)", x); \ return 0; \ } else { \ - if (x <= gpGlobals->maxClients) { \ + if (x > 0 && x <= gpGlobals->maxClients) { \ if (!MF_IsPlayerIngame(x)) { \ MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d (not in-game)", x); \ return 0; \