From 87c4d0ea576d6a3e8ec78329ff510291ccf0e674 Mon Sep 17 00:00:00 2001 From: worktycho Date: Wed, 4 Jun 2014 10:58:09 +0100 Subject: [PATCH 1/5] Initialise m_Callbacks field to NULL in empty constructor. --- src/PolarSSL++/CallbackSslContext.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PolarSSL++/CallbackSslContext.cpp b/src/PolarSSL++/CallbackSslContext.cpp index 0cc88a14..c4d19b2a 100644 --- a/src/PolarSSL++/CallbackSslContext.cpp +++ b/src/PolarSSL++/CallbackSslContext.cpp @@ -11,7 +11,8 @@ -cCallbackSslContext::cCallbackSslContext(void) +cCallbackSslContext::cCallbackSslContext(void) : + m_Callbacks(NULL) { // Nothing needed, but the constructor needs to exist so } From 85be62a8cd7eeb1c5c9a2967f9928abf46817261 Mon Sep 17 00:00:00 2001 From: worktycho Date: Wed, 4 Jun 2014 11:02:17 +0100 Subject: [PATCH 2/5] Removed unused field test --- src/PolarSSL++/AesCfb128Decryptor.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/PolarSSL++/AesCfb128Decryptor.h b/src/PolarSSL++/AesCfb128Decryptor.h index 68c203d7..84c790b8 100644 --- a/src/PolarSSL++/AesCfb128Decryptor.h +++ b/src/PolarSSL++/AesCfb128Decryptor.h @@ -19,7 +19,6 @@ class cAesCfb128Decryptor { public: - Byte test; cAesCfb128Decryptor(void); ~cAesCfb128Decryptor(); From 98c575ebc276b9825c3da186b8b560811e855da6 Mon Sep 17 00:00:00 2001 From: worktycho Date: Wed, 4 Jun 2014 11:12:06 +0100 Subject: [PATCH 3/5] Make sure m_StackSizeToBeUsedInRepair Always has a valid value --- src/UI/SlotArea.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index 59a6384b..682f20c0 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 From ae37dfec8d44f2a4adca0c47bf3e490f85f1ed0b Mon Sep 17 00:00:00 2001 From: worktycho Date: Wed, 4 Jun 2014 11:29:08 +0100 Subject: [PATCH 4/5] Fixed bad coordinate --- src/ClientHandle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 080e859d..d47ceff0 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -1306,7 +1306,7 @@ void cClientHandle::HandlePlaceBlock(int a_BlockX, int a_BlockY, int a_BlockZ, e if (!a_ItemHandler.GetPlacementBlockTypeMeta(World, m_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, BlockType, BlockMeta)) { // Handler refused the placement, send that information back to the client: - World->SendBlockTo(a_BlockX, a_BlockY, a_BlockY, m_Player); + World->SendBlockTo(a_BlockX, a_BlockY, a_BlockZ, m_Player); m_Player->GetInventory().SendEquippedSlot(); return; } From c94d0c814442785b2be7654c3a8c0d9c1fc5f765 Mon Sep 17 00:00:00 2001 From: worktycho Date: Wed, 4 Jun 2014 11:39:21 +0100 Subject: [PATCH 5/5] derp --- src/UI/SlotArea.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index 682f20c0..728692f2 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) { }