mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
Fixed sending 0 to find_ent_by_owner.
This commit is contained in:
parent
5094bba5e9
commit
b040f4474b
@ -1526,8 +1526,8 @@ static cell AMX_NATIVE_CALL find_ent_by_owner(AMX *amx, cell *params) // native
|
|||||||
{
|
{
|
||||||
int iEnt = params[1];
|
int iEnt = params[1];
|
||||||
int oEnt = params[3];
|
int oEnt = params[3];
|
||||||
// Check index to start searching at, 0 must be possible.
|
// Check index to start searching at, 0 must be possible for iEnt.
|
||||||
if (!is_ent_valid(iEnt) || !is_ent_valid(oEnt)) {
|
if ((iEnt != 0 && !is_ent_valid(iEnt)) || !is_ent_valid(oEnt)) {
|
||||||
EngineError(amx, "Invalid Entity");
|
EngineError(amx, "Invalid Entity");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user