From faf15e5d88e864a5e03e3820cbca1cb3049203ba Mon Sep 17 00:00:00 2001 From: Mr_Goldberg Date: Wed, 26 May 2021 23:06:40 -0400 Subject: [PATCH] Make GetItemDefinitionIDs behave more like the real one. --- dll/steam_inventory.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dll/steam_inventory.h b/dll/steam_inventory.h index df98fba..81602ea 100644 --- a/dll/steam_inventory.h +++ b/dll/steam_inventory.h @@ -623,7 +623,10 @@ bool GetItemDefinitionIDs( PRINT_DEBUG("array_size %u\n", *punItemDefIDsArraySize); - if (pItemDefIDs == nullptr) + if (!item_definitions_loaded) + return false; + + if (pItemDefIDs == nullptr || *punItemDefIDsArraySize == 0) { *punItemDefIDsArraySize = defined_items.size(); return true;