From 6cd612d3594012bac14b1aad791f1117faf57bf0 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Tue, 6 Oct 2009 07:35:21 +0000 Subject: Fix regression introduced by r44459; LGoP2 crashed after Infocom logo svn-id: r44688 --- engines/made/resource.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines/made/resource.cpp') diff --git a/engines/made/resource.cpp b/engines/made/resource.cpp index a2e057f65d..36a1c4c71c 100644 --- a/engines/made/resource.cpp +++ b/engines/made/resource.cpp @@ -499,8 +499,9 @@ void ResourceReader::loadIndex(ResourceSlots *slots) { _fd->readUint32LE(); // skip index size _fd->readUint32LE(); // skip unknown _fd->readUint32LE(); // skip res type - _fd->readUint16LE(); // skip unknown count - uint16 count = _fd->readUint16LE(); + uint16 count1 = _fd->readUint16LE(); + uint16 count2 = _fd->readUint16LE(); + uint16 count = MAX(count1, count2); _fd->readUint16LE(); // skip unknown count for (uint16 i = 0; i < count; i++) { uint32 offs = _fd->readUint32LE(); -- cgit v1.2.3