From b63140ca63551706a9b362461aab8c86fca9ecb8 Mon Sep 17 00:00:00 2001 From: a Date: Fri, 6 Dec 2024 23:08:32 +0200 Subject: [PATCH] properly extract inventory item quantity in `Steam_Inventory::GetResultItems()` --- dll/steam_inventory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/steam_inventory.cpp b/dll/steam_inventory.cpp index 9e0b19f3..fcdbbe49 100644 --- a/dll/steam_inventory.cpp +++ b/dll/steam_inventory.cpp @@ -164,7 +164,7 @@ bool Steam_Inventory::GetResultItems( SteamInventoryResult_t resultHandle, pOutItemsArray->m_itemId = pOutItemsArray->m_iDefinition; try { - pOutItemsArray->m_unQuantity = i.value().get(); + pOutItemsArray->m_unQuantity = i->value("quantity", static_cast(0)); } catch (...) { @@ -183,7 +183,7 @@ bool Steam_Inventory::GetResultItems( SteamInventoryResult_t resultHandle, try { - pOutItemsArray->m_unQuantity = it->get(); + pOutItemsArray->m_unQuantity = it->value("quantity", static_cast(0)); } catch (...) {