From b040f4474b0ba242c07833a20a1f36bfdd07cd59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johnny=20Bergstr=C3=B6m?= Date: Mon, 6 Sep 2004 08:21:13 +0000 Subject: [PATCH] Fixed sending 0 to find_ent_by_owner. --- dlls/engine/entity.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/engine/entity.cpp b/dlls/engine/entity.cpp index c92080c5..b26eec49 100755 --- a/dlls/engine/entity.cpp +++ b/dlls/engine/entity.cpp @@ -1526,8 +1526,8 @@ static cell AMX_NATIVE_CALL find_ent_by_owner(AMX *amx, cell *params) // native { int iEnt = params[1]; int oEnt = params[3]; - // Check index to start searching at, 0 must be possible. - if (!is_ent_valid(iEnt) || !is_ent_valid(oEnt)) { + // Check index to start searching at, 0 must be possible for iEnt. + if ((iEnt != 0 && !is_ent_valid(iEnt)) || !is_ent_valid(oEnt)) { EngineError(amx, "Invalid Entity"); return 0; }