Make GetItemDefinitionIDs behave more like the real one.

merge-requests/14/merge
Mr_Goldberg 2021-05-26 23:06:40 -04:00
parent c162ca79d5
commit faf15e5d88
No known key found for this signature in database
GPG Key ID: 8597D87419DEF278
1 changed files with 4 additions and 1 deletions

View File

@ -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;