summaryrefslogtreecommitdiffstats
path: root/src/Entities/Pickup.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Entities/Pickup.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp
index 0e3cf8ef2..4f7462a1f 100644
--- a/src/Entities/Pickup.cpp
+++ b/src/Entities/Pickup.cpp
@@ -47,6 +47,9 @@ public:
{
short CombineCount = static_cast<short>(Item.m_ItemCount);
if ((CombineCount + static_cast<short>(m_Pickup->GetItem().m_ItemCount)) > static_cast<short>(Item.GetMaxStackSize()))
+ {
+ CombineCount = Item.GetMaxStackSize() - m_Pickup->GetItem().m_ItemCount;
+ }
if (CombineCount <= 0)
{