From f0b496205272cde31a9dd406b0b8c3d1df86adc4 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Mon, 8 Feb 2016 22:21:42 -0600 Subject: [PATCH] Fix: CountInv must return a value if the caller's expecting one --- src/thingdef/thingdef_codeptr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/thingdef/thingdef_codeptr.cpp b/src/thingdef/thingdef_codeptr.cpp index e6759e18a..ebc5c0b97 100644 --- a/src/thingdef/thingdef_codeptr.cpp +++ b/src/thingdef/thingdef_codeptr.cpp @@ -238,14 +238,14 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, CountInv) self = COPY_AAPTR(self, pick_pointer); if (self == NULL || itemtype == NULL) { - ret->SetInt(false); + ret->SetInt(0); } else { AInventory *item = self->FindInventory(itemtype); ret->SetInt(item ? item->Amount : 0); - return 1; } + return 1; } return 0; }