diff --git a/wadsrc/static/zscript/actors/inventory/inventory.zs b/wadsrc/static/zscript/actors/inventory/inventory.zs index 10ee3a5f2..986bf786d 100644 --- a/wadsrc/static/zscript/actors/inventory/inventory.zs +++ b/wadsrc/static/zscript/actors/inventory/inventory.zs @@ -932,7 +932,7 @@ class Inventory : Actor //=========================================================================== virtual void DepleteBy(int by) { - if (amount < 1 || by >= amount) + if (by < 1 || amount < 1 || by >= amount) { DepleteOrDestroy(); }