mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-30 14:14:43 +00:00
Fixed inventory regression introduced with yesterday's commit.
svn-id: r29091
This commit is contained in:
parent
5788598f10
commit
8e1e4b9079
@ -333,10 +333,7 @@ void Inventory::clear(bool keepVerbs) {
|
||||
|
||||
|
||||
ItemName Inventory::getItemName(ItemPosition pos) const {
|
||||
// TODO: should assert against the number of items actually contained,
|
||||
// not the theoretical limit.
|
||||
assert(pos >= 0 && pos < INVENTORY_MAX_ITEMS);
|
||||
return _items[pos]._index;
|
||||
return (pos >= 0 && pos < INVENTORY_MAX_ITEMS) ? _items[pos]._index : 0;
|
||||
}
|
||||
|
||||
const InventoryItem* Inventory::getItem(ItemPosition pos) const {
|
||||
|
@ -147,7 +147,6 @@ void Parallaction_ns::doLoadGame(uint16 slot) {
|
||||
f->readLine(s, 15);
|
||||
name = atoi(s);
|
||||
|
||||
printf("loadGame: inv[%i].id = %i, inv[%i].index = %i\n", _si, value, _si, name);
|
||||
addInventoryItem(name, value);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user