From e946616772d68f6646710b5c69c237df3ed641c6 Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Tue, 14 Aug 2012 08:33:09 +0000 Subject: Shift-click completed in survival inventory window git-svn-id: http://mc-server.googlecode.com/svn/trunk@732 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cInventory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/cInventory.cpp') 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; -- cgit v1.2.3