summaryrefslogtreecommitdiffstats
path: root/src/UI
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2014-06-04 13:23:28 +0200
committerworktycho <work.tycho@gmail.com>2014-06-04 13:23:28 +0200
commit2de36c8ccc058429c74e139a97d832c29e04b8fb (patch)
tree612af1395f17af0c2fb7efff7fc9fa5f63d6bfca /src/UI
parentFixed buffer overflow in JSON. (diff)
parentderp (diff)
downloadcuberite-2de36c8ccc058429c74e139a97d832c29e04b8fb.tar
cuberite-2de36c8ccc058429c74e139a97d832c29e04b8fb.tar.gz
cuberite-2de36c8ccc058429c74e139a97d832c29e04b8fb.tar.bz2
cuberite-2de36c8ccc058429c74e139a97d832c29e04b8fb.tar.lz
cuberite-2de36c8ccc058429c74e139a97d832c29e04b8fb.tar.xz
cuberite-2de36c8ccc058429c74e139a97d832c29e04b8fb.tar.zst
cuberite-2de36c8ccc058429c74e139a97d832c29e04b8fb.zip
Diffstat (limited to 'src/UI')
-rw-r--r--src/UI/SlotArea.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp
index 59a6384b1..728692f2a 100644
--- a/src/UI/SlotArea.cpp
+++ b/src/UI/SlotArea.cpp
@@ -625,7 +625,8 @@ void cSlotAreaCrafting::HandleCraftItem(const cItem & a_Result, cPlayer & a_Play
cSlotAreaAnvil::cSlotAreaAnvil(cAnvilWindow & a_ParentWindow) :
cSlotAreaTemporary(3, a_ParentWindow),
- m_MaximumCost(0)
+ m_MaximumCost(0),
+ m_StackSizeToBeUsedInRepair(0)
{
}
@@ -796,6 +797,7 @@ void cSlotAreaAnvil::OnTakeResult(cPlayer & a_Player)
{
cItem NewSecondItem(*Item);
NewSecondItem.m_ItemCount -= m_StackSizeToBeUsedInRepair;
+ m_StackSizeToBeUsedInRepair = 0;
SetSlot(1, a_Player, NewSecondItem);
}
else