Don't try to transfer inventory files with no filename

This commit is contained in:
Casper Warden
2023-11-21 17:38:50 +00:00
parent 5151696e18
commit 3873164475
3 changed files with 10 additions and 4 deletions

View File

@@ -978,8 +978,14 @@ export class GameObject implements IGameObjectData
return FilterResponse.Match;
}
});
const fileName = Utils.BufferToStringSimple(inventory.InventoryData.Filename);
if (inventory.InventoryData.Filename.length === 0)
{
// Inventory is empty
this.inventory = [];
return;
}
const fileName = Utils.BufferToStringSimple(inventory.InventoryData.Filename);
const file = await this.region.circuit.XferFileDown(fileName, true, false, UUID.zero(), AssetType.Unknown, true);
this.inventory = [];
if (file.length === 0)