summaryrefslogtreecommitdiffstats
path: root/src/Inventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Inventory.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Inventory.cpp b/src/Inventory.cpp
index c595da5b0..079743e90 100644
--- a/src/Inventory.cpp
+++ b/src/Inventory.cpp
@@ -117,7 +117,7 @@ int cInventory::AddItem(const cItem & a_Item, bool a_AllowNewStacks, bool a_tryT
}
res += m_HotbarSlots.AddItem(ToAdd, a_AllowNewStacks, a_tryToFillEquippedFirst ? m_EquippedSlotNum : -1);
- ToAdd.m_ItemCount = a_Item.m_ItemCount - res;
+ ToAdd.m_ItemCount = a_Item.m_ItemCount - static_cast<char>(res);
if (ToAdd.m_ItemCount == 0)
{
return res;