From de59b3c25a3f9a32d93b87664179c40ca998ae49 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Fri, 27 Jul 2012 22:04:27 +0100 Subject: [PATCH] TEENAGENT: Fix inventory regression due to missing blank entry. This was a regression from f856a0a7466f62ad0bd26484bf5c07c2d01c1461. The _objects list starts with a blank Inventory Object entry, but this was previously done in an implicit manner with an address overlap. Fixed in a more explicit manner. --- engines/teenagent/inventory.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engines/teenagent/inventory.cpp b/engines/teenagent/inventory.cpp index 7bf974217b6..6c9a2319848 100644 --- a/engines/teenagent/inventory.cpp +++ b/engines/teenagent/inventory.cpp @@ -58,6 +58,8 @@ Inventory::Inventory(TeenAgentEngine *vm) : _vm(vm) { } _offset[numInventoryItems] = items_size; + InventoryObject io_blank; + _objects.push_back(io_blank); for (byte i = 0; i < numInventoryItems; ++i) { InventoryObject io; uint16 obj_addr = vm->res->dseg.get_word(dsAddr_inventoryItemDataPtrTable + i * 2);