mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-12-27 02:44:16 +08:00
properly extract inventory item quantity in Steam_Inventory::GetResultItems()
This commit is contained in:
parent
f6ec01fd49
commit
b63140ca63
@ -164,7 +164,7 @@ bool Steam_Inventory::GetResultItems( SteamInventoryResult_t resultHandle,
|
|||||||
pOutItemsArray->m_itemId = pOutItemsArray->m_iDefinition;
|
pOutItemsArray->m_itemId = pOutItemsArray->m_iDefinition;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
pOutItemsArray->m_unQuantity = i.value().get<int>();
|
pOutItemsArray->m_unQuantity = i->value("quantity", static_cast<uint16>(0));
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
@ -183,7 +183,7 @@ bool Steam_Inventory::GetResultItems( SteamInventoryResult_t resultHandle,
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
pOutItemsArray->m_unQuantity = it->get<int>();
|
pOutItemsArray->m_unQuantity = it->value("quantity", static_cast<uint16>(0));
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user