[Scummvm-git-logs] scummvm master -> b2df74305bd524d0e12a610ed2ba148902180ad6

dreammaster dreammaster at scummvm.org
Sun Jan 14 20:32:09 CET 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b2df74305b XEEN: Fix loading save archive index from savegames


Commit: b2df74305bd524d0e12a610ed2ba148902180ad6
    https://github.com/scummvm/scummvm/commit/b2df74305bd524d0e12a610ed2ba148902180ad6
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-01-14T14:32:01-05:00

Commit Message:
XEEN: Fix loading save archive index from savegames

Changed paths:
    engines/xeen/files.cpp


diff --git a/engines/xeen/files.cpp b/engines/xeen/files.cpp
index 0c6ff1d..d8d5448 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;





More information about the Scummvm-git-logs mailing list