diff --git a/dlls/engine/engine.cpp b/dlls/engine/engine.cpp index 1ad9f24f..40ed4673 100755 --- a/dlls/engine/engine.cpp +++ b/dlls/engine/engine.cpp @@ -369,7 +369,7 @@ static cell AMX_NATIVE_CALL get_info_keybuffer(AMX *amx, cell *params) { int iEnt = params[1]; - if (!is_ent_valid(iEnt)) { + if (FNullEnt(iEnt) || iEnt < 1 || iEnt > gpGlobals->maxClients) { EngineError(amx, "Invalid Entity %d", iEnt); return 0; }