mirror of
https://github.com/cuberite/cuberite.git
synced 2025-01-08 11:57:39 +08:00
fixed possible 64+64 error
This commit is contained in:
parent
5fa68ea807
commit
00dbbabc5c
@ -45,11 +45,8 @@ public:
|
||||
cItem & Item = OtherPickup.GetItem();
|
||||
if ((Distance < 1.2) && Item.IsEqual(m_Pickup->GetItem()) && OtherPickup.CanCombine())
|
||||
{
|
||||
char CombineCount = Item.m_ItemCount;
|
||||
if ((CombineCount + m_Pickup->GetItem().m_ItemCount) > Item.GetMaxStackSize())
|
||||
{
|
||||
CombineCount = Item.GetMaxStackSize() - m_Pickup->GetItem().m_ItemCount;
|
||||
}
|
||||
short CombineCount = static_cast<short>(Item.m_ItemCount);
|
||||
if ((CombineCount + static_cast<short>(m_Pickup->GetItem().m_ItemCount)) > static_cast<short>(Item.GetMaxStackSize()))
|
||||
|
||||
if (CombineCount <= 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user