Merge pull request #1059 from mc-server/coverity_fixes

Coverity fixes
master
worktycho 2014-06-04 12:23:28 +01:00
commit 2de36c8ccc
4 changed files with 6 additions and 4 deletions

View File

@ -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;
}

View File

@ -19,7 +19,6 @@
class cAesCfb128Decryptor
{
public:
Byte test;
cAesCfb128Decryptor(void);
~cAesCfb128Decryptor();

View File

@ -11,7 +11,8 @@
cCallbackSslContext::cCallbackSslContext(void)
cCallbackSslContext::cCallbackSslContext(void) :
m_Callbacks(NULL)
{
// Nothing needed, but the constructor needs to exist so
}

View File

@ -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