From f1118030e8e87156086d8d776255fbc87a1cd691 Mon Sep 17 00:00:00 2001 From: Nemirtingas Date: Sun, 25 Aug 2019 00:29:05 +0200 Subject: [PATCH] Added the forgotten size update if copied less chars. --- dll/steam_inventory.h | 1 + 1 file changed, 1 insertion(+) diff --git a/dll/steam_inventory.h b/dll/steam_inventory.h index 8518230..bdde870 100644 --- a/dll/steam_inventory.h +++ b/dll/steam_inventory.h @@ -666,6 +666,7 @@ bool GetItemDefinitionProperty( SteamItemDef_t iDefinition, const char *pchPrope { // copy what we can strncpy(pchValueBuffer, val.c_str(), *punValueBufferSizeOut); + *punValueBufferSizeOut = std::min(static_cast(val.length() + 1), *punValueBufferSizeOut); } else {