From 00dbbabc5c9a5ad0347e9932128ee729b1e183e0 Mon Sep 17 00:00:00 2001 From: Marc Lorenz <44411062+12xx12@users.noreply.github.com> Date: Tue, 21 Dec 2021 12:45:05 +0100 Subject: fixed possible 64+64 error --- src/Entities/Pickup.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp index d266df502..0e3cf8ef2 100644 --- a/src/Entities/Pickup.cpp +++ b/src/Entities/Pickup.cpp @@ -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(Item.m_ItemCount); + if ((CombineCount + static_cast(m_Pickup->GetItem().m_ItemCount)) > static_cast(Item.GetMaxStackSize())) if (CombineCount <= 0) { -- cgit v1.2.3