TEENAGENT: Fix inventory regression due to missing blank entry.

This was a regression from f856a0a746.
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.
This commit is contained in:
D G Turner 2012-07-27 22:04:27 +01:00
parent 5859d0fab1
commit de59b3c25a

View File

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