aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/engine/savegame.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index a59d4c000b..ea56a2faff 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -179,7 +179,7 @@ void SegManager::saveLoadWithSerializer(Common::Serializer &s) {
mobj->saveLoadWithSerializer(s);
- if (type == SEG_TYPE_SCRIPT && s.getVersion() >= 28) {
+ if (type == SEG_TYPE_SCRIPT) {
Script *scr = (Script *)mobj;
// If we are loading a script, perform some extra steps
@@ -196,7 +196,8 @@ void SegManager::saveLoadWithSerializer(Common::Serializer &s) {
}
// Sync the script's string heap
- scr->syncStringHeap(s);
+ if (s.getVersion() >= 28)
+ scr->syncStringHeap(s);
}
}