From 98c575ebc276b9825c3da186b8b560811e855da6 Mon Sep 17 00:00:00 2001 From: worktycho Date: Wed, 4 Jun 2014 11:12:06 +0100 Subject: Make sure m_StackSizeToBeUsedInRepair Always has a valid value --- src/UI/SlotArea.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/UI/SlotArea.cpp') diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index 59a6384b1..682f20c00 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 -- cgit v1.2.3 From c94d0c814442785b2be7654c3a8c0d9c1fc5f765 Mon Sep 17 00:00:00 2001 From: worktycho Date: Wed, 4 Jun 2014 11:39:21 +0100 Subject: derp --- src/UI/SlotArea.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/UI/SlotArea.cpp') diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index 682f20c00..728692f2a 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -626,7 +626,7 @@ void cSlotAreaCrafting::HandleCraftItem(const cItem & a_Result, cPlayer & a_Play cSlotAreaAnvil::cSlotAreaAnvil(cAnvilWindow & a_ParentWindow) : cSlotAreaTemporary(3, a_ParentWindow), m_MaximumCost(0), - m_StackSizeToBeUsedInRepair(0); + m_StackSizeToBeUsedInRepair(0) { } -- cgit v1.2.3