This commit is contained in:
Steve Dudenhoeffer 2004-09-10 02:58:41 +00:00
parent 767795b91e
commit 0a74f09273

View File

@ -303,7 +303,7 @@ static cell AMX_NATIVE_CALL ns_set_deaths(AMX *amx, cell *params)
static cell AMX_NATIVE_CALL ns_get_struct_owner(AMX *amx, cell *params) static cell AMX_NATIVE_CALL ns_get_struct_owner(AMX *amx, cell *params)
{ {
int id = params[1]; int id = params[1];
if (id <= gpGlobals->maxClients || id <= gpGlobals->maxEntities) if (id <= gpGlobals->maxClients || id >= gpGlobals->maxEntities)
return 0; return 0;
edict_t *pEntity = INDEXENT2(id); edict_t *pEntity = INDEXENT2(id);
if (!pEntity) if (!pEntity)
@ -316,7 +316,7 @@ static cell AMX_NATIVE_CALL ns_set_struct_owner(AMX *amx, cell *params)
{ {
int id = params[1]; int id = params[1];
int ido = params[2]; int ido = params[2];
if (id <= gpGlobals->maxClients || id <= gpGlobals->maxEntities) if (id <= gpGlobals->maxClients || id >= gpGlobals->maxEntities)
return 0; return 0;
if (ido > gpGlobals->maxClients || ido < -1) if (ido > gpGlobals->maxClients || ido < -1)
return 0; return 0;