diff options
author | Paul Gilbert | 2018-01-14 14:32:01 -0500 |
---|---|---|
committer | Paul Gilbert | 2018-01-14 14:32:01 -0500 |
commit | b2df74305bd524d0e12a610ed2ba148902180ad6 (patch) | |
tree | d38178c1a525236c5d7e7b8efe23aebbabc41035 /engines/xeen | |
parent | 700bcc73e1b829cb15b1dcc56027b8da364c2468 (diff) | |
download | scummvm-rg350-b2df74305bd524d0e12a610ed2ba148902180ad6.tar.gz scummvm-rg350-b2df74305bd524d0e12a610ed2ba148902180ad6.tar.bz2 scummvm-rg350-b2df74305bd524d0e12a610ed2ba148902180ad6.zip |
XEEN: Fix loading save archive index from savegames
Diffstat (limited to 'engines/xeen')
-rw-r--r-- | engines/xeen/files.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/xeen/files.cpp b/engines/xeen/files.cpp index 0c6ff1d0cf..d8d54488af 100644 --- a/engines/xeen/files.cpp +++ b/engines/xeen/files.cpp @@ -70,16 +70,16 @@ void BaseCCArchive::loadIndex(Common::SeekableReadStream &stream) { } // Extract the index data into entry structures - _index.reserve(count); + _index.resize(count); const byte *entryP = &rawIndex[0]; - for (int i = 0; i < count; ++i, entryP += 8) { + for (int idx = 0; idx < count; ++idx, entryP += 8) { CCEntry entry; entry._id = READ_LE_UINT16(entryP); entry._offset = READ_LE_UINT32(entryP + 2) & 0xffffff; entry._size = READ_LE_UINT16(entryP + 5); assert(!entryP[7]); - _index.push_back(entry); + _index[idx] = entry; } delete[] rawIndex; |