diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-08-14 10:33:09 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-08-14 10:33:09 +0200 |
commit | e946616772d68f6646710b5c69c237df3ed641c6 (patch) | |
tree | 24b09593dfe63a0bf5db9e9ec59ff482c34aba3d /source/cInventory.cpp | |
parent | Made cobwebs transparent (diff) | |
download | cuberite-e946616772d68f6646710b5c69c237df3ed641c6.tar cuberite-e946616772d68f6646710b5c69c237df3ed641c6.tar.gz cuberite-e946616772d68f6646710b5c69c237df3ed641c6.tar.bz2 cuberite-e946616772d68f6646710b5c69c237df3ed641c6.tar.lz cuberite-e946616772d68f6646710b5c69c237df3ed641c6.tar.xz cuberite-e946616772d68f6646710b5c69c237df3ed641c6.tar.zst cuberite-e946616772d68f6646710b5c69c237df3ed641c6.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cInventory.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/cInventory.cpp b/source/cInventory.cpp index 1f4405470..8750b5368 100644 --- a/source/cInventory.cpp +++ b/source/cInventory.cpp @@ -348,7 +348,7 @@ int cInventory::MoveItem(ENUM_ITEM_ID a_ItemType, short a_ItemDamage, int a_Coun { int MaxCount = ItemHandler(a_ItemType)->GetMaxStackSize(); ASSERT(m_Slots[i].m_ItemCount <= MaxCount); - int NumToMove = std::min(a_Count, MaxCount); + int NumToMove = std::min(a_Count, MaxCount - m_Slots[i].m_ItemCount); m_Slots[i].m_ItemCount += NumToMove; m_Slots[i].m_ItemHealth = a_ItemDamage; m_Slots[i].m_ItemID = a_ItemType; |