[Scummvm-git-logs] scummvm master -> a61bcdee59795f6ed102a18af887c2bf0b2ec989
sluicebox
noreply at scummvm.org
Tue Mar 22 21:22:13 UTC 2022
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:
a61bcdee59 SCI32: Fix saving from GMM in LSL7
Commit: a61bcdee59795f6ed102a18af887c2bf0b2ec989
https://github.com/scummvm/scummvm/commit/a61bcdee59795f6ed102a18af887c2bf0b2ec989
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2022-03-22T17:20:51-04:00
Commit Message:
SCI32: Fix saving from GMM in LSL7
Changed paths:
engines/sci/engine/savegame.cpp
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index a37897a319f..28a6e0f7815 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -1241,7 +1241,14 @@ bool gamestate_save(EngineState *s, Common::WriteStream *fh, const Common::Strin
// If the game version is empty, we are probably saving from the GMM, so read it
// from global 27 and then the VERSION file
if (ver == "") {
- ver = s->_segMan->getString(s->variables[VAR_GLOBAL][kGlobalVarVersion]);
+ reg_t versionRef = s->variables[VAR_GLOBAL][kGlobalVarVersion];
+#ifdef ENABLE_SCI32
+ // LSL7 stores the version string as an object instead of a reference
+ if (s->_segMan->isObject(versionRef)) {
+ versionRef = readSelector(s->_segMan, versionRef, SELECTOR(data));
+ }
+#endif
+ ver = s->_segMan->getString(versionRef);
if (ver == "") {
Common::ScopedPtr<Common::SeekableReadStream> versionFile(SearchMan.createReadStreamForMember("VERSION"));
ver = versionFile ? versionFile->readLine() : "";
More information about the Scummvm-git-logs
mailing list