From 5808128ca863a53a91fc174ddce787e7e2815a5c Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Tue, 4 Jun 2013 11:46:33 +0000 Subject: ItemGrid: fixed changing item count when ToRemove == CurrentCount Fixes FS #380 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1545 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/ItemGrid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/ItemGrid.cpp b/source/ItemGrid.cpp index 33cae3e17..5284f3ae1 100644 --- a/source/ItemGrid.cpp +++ b/source/ItemGrid.cpp @@ -304,7 +304,7 @@ int cItemGrid::ChangeSlotCount(int a_SlotNum, int a_AddToCount) return 0; } - if (m_Slots[a_SlotNum].m_ItemCount < -a_AddToCount) + if (m_Slots[a_SlotNum].m_ItemCount <= -a_AddToCount) { // Trying to remove more items than there already are, make the item empty m_Slots[a_SlotNum].Empty(); -- cgit v1.2.3