From 1e4691e44c005b9231f8f6eb6d6afc0b1d2eae56 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 02:41:11 +0000 Subject: [PATCH] Fix unlimited charges sentinel: use >= instead of > for int16::max() check Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com> --- common/shareddb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/shareddb.cpp b/common/shareddb.cpp index 98f02fada..3ebd0e97e 100644 --- a/common/shareddb.cpp +++ b/common/shareddb.cpp @@ -746,7 +746,7 @@ bool SharedDatabase::GetInventory(Client *c) inst->SetColor(color); } - if (charges > std::numeric_limits::max()) { + if (charges >= std::numeric_limits::max()) { inst->SetCharges(-1); } else if (charges == 0 && inst->IsStackable()) { // Stackable items need a minimum charge of 1 remain moveable.