mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 05:51:20 +00:00
Fix: CountInv must return a value if the caller's expecting one
This commit is contained in:
parent
8d159b8506
commit
f0b4962052
1 changed files with 2 additions and 2 deletions
|
@ -238,14 +238,14 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, CountInv)
|
||||||
self = COPY_AAPTR(self, pick_pointer);
|
self = COPY_AAPTR(self, pick_pointer);
|
||||||
if (self == NULL || itemtype == NULL)
|
if (self == NULL || itemtype == NULL)
|
||||||
{
|
{
|
||||||
ret->SetInt(false);
|
ret->SetInt(0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AInventory *item = self->FindInventory(itemtype);
|
AInventory *item = self->FindInventory(itemtype);
|
||||||
ret->SetInt(item ? item->Amount : 0);
|
ret->SetInt(item ? item->Amount : 0);
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue