From 9e767977bedca5bb4b315deb2ed15b189fc11134 Mon Sep 17 00:00:00 2001 From: Tiberon Date: Sat, 4 May 2024 13:59:12 -0700 Subject: [PATCH] Fix storage related integer overflow --- src/map/item_container.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/item_container.cpp b/src/map/item_container.cpp index b65a75ccf1e..ad8f3c0bcbe 100644 --- a/src/map/item_container.cpp +++ b/src/map/item_container.cpp @@ -74,7 +74,7 @@ uint16 CItemContainer::GetBuff() const uint8 CItemContainer::AddBuff(int8 buff) { m_buff += buff; - return SetSize(std::clamp((uint8)m_buff, 0, 80)); // Limit in 0-80 cells for character + return SetSize(std::clamp(m_buff, 0, 80)); // Limit in 0-80 cells for character } /************************************************************************