Engine: Fix CHECK_ENTITY() logic error (0 is not a player)

This commit is contained in:
Valentin Grünbacher 2015-05-11 00:39:17 +02:00
parent 7bf47f90d9
commit dc73473394

View File

@ -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; \