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 {