diff options
author | Marc Lorenz <44411062+12xx12@users.noreply.github.com> | 2021-12-21 13:21:58 +0100 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2022-01-14 20:43:29 +0100 |
commit | c741d81017dc9d156091e122f6bf91a84d1b32f3 (patch) | |
tree | 519ce3904f7fa72de3a0170f5009cc9f922bdb54 | |
parent | fixed possible 64+64 error (diff) | |
download | cuberite-c741d81017dc9d156091e122f6bf91a84d1b32f3.tar cuberite-c741d81017dc9d156091e122f6bf91a84d1b32f3.tar.gz cuberite-c741d81017dc9d156091e122f6bf91a84d1b32f3.tar.bz2 cuberite-c741d81017dc9d156091e122f6bf91a84d1b32f3.tar.lz cuberite-c741d81017dc9d156091e122f6bf91a84d1b32f3.tar.xz cuberite-c741d81017dc9d156091e122f6bf91a84d1b32f3.tar.zst cuberite-c741d81017dc9d156091e122f6bf91a84d1b32f3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Pickup.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Entities/Pickup.cpp b/src/Entities/Pickup.cpp index 0e3cf8ef2..4f7462a1f 100644 --- a/src/Entities/Pickup.cpp +++ b/src/Entities/Pickup.cpp @@ -47,6 +47,9 @@ public: { short CombineCount = static_cast<short>(Item.m_ItemCount); if ((CombineCount + static_cast<short>(m_Pickup->GetItem().m_ItemCount)) > static_cast<short>(Item.GetMaxStackSize())) + { + CombineCount = Item.GetMaxStackSize() - m_Pickup->GetItem().m_ItemCount; + } if (CombineCount <= 0) { |