aboutsummaryrefslogtreecommitdiff
path: root/engines/lastexpress/game
diff options
context:
space:
mode:
Diffstat (limited to 'engines/lastexpress/game')
-rw-r--r--engines/lastexpress/game/savepoint.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/engines/lastexpress/game/savepoint.cpp b/engines/lastexpress/game/savepoint.cpp
index 557468e222..6b2dfc5930 100644
--- a/engines/lastexpress/game/savepoint.cpp
+++ b/engines/lastexpress/game/savepoint.cpp
@@ -242,7 +242,15 @@ void SavePoints::saveLoadWithSerializer(Common::Serializer &s) {
}
// Skip uninitialized data if any
- s.skip((_savePointsMaxSize - dataSize) * 16);
+ // (we are using a compressed stream, so we cannot seek on load)
+ uint32 unusedDataSize = (_savePointsMaxSize - dataSize) * 16;
+ if (s.isLoading()) {
+ byte *empty = (byte *)malloc(unusedDataSize);
+ s.syncBytes(empty, unusedDataSize);
+ free(empty);
+ } else {
+ s.skip(unusedDataSize);
+ }
// Number of savepoints
uint32 numSavepoints = _savepoints.size();