From ef9c9b78a3cf4f3392d86593586e076433dd78f8 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 6 Feb 2015 08:24:44 +0100 Subject: ACCESS: MM - Fix a crash --- engines/access/inventory.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'engines/access') diff --git a/engines/access/inventory.cpp b/engines/access/inventory.cpp index 28a5cc2746..cdb50f5e99 100644 --- a/engines/access/inventory.cpp +++ b/engines/access/inventory.cpp @@ -73,19 +73,20 @@ InventoryManager::InventoryManager(AccessEngine *vm) : Manager(vm) { names = Amazon::INVENTORY_NAMES; combineP = &Amazon::COMBO_TABLE[0][0]; _inv.resize(85); + for (uint i = 0; i < _inv.size(); ++i, combineP += 4) + _inv[i].load(names[i], combineP); break; case GType_MartianMemorandum: names = Martian::INVENTORY_NAMES; combineP = nullptr; _inv.resize(55); + for (uint i = 0; i < _inv.size(); ++i) + _inv[i].load(names[i], nullptr); break; default: error("Unknown game"); } - for (uint i = 0; i < _inv.size(); ++i, combineP += 4) - _inv[i].load(names[i], combineP); - for (uint i = 0; i < 26; ++i) { const int *r = INVCOORDS[i]; _invCoords.push_back(Common::Rect(r[0], r[2], r[1], r[3])); -- cgit v1.2.3