diff options
author | Colin Snover | 2017-04-22 15:08:28 -0500 |
---|---|---|
committer | Colin Snover | 2017-04-22 15:34:31 -0500 |
commit | 5b0c20da9489a46fe1a89d968aada23976a2cbcf (patch) | |
tree | b60e5123a68f221f8547064a40c6326688b9c181 /engines | |
parent | 106afe1cfbffcca0ce093287aa79f826eba36bc5 (diff) | |
download | scummvm-rg350-5b0c20da9489a46fe1a89d968aada23976a2cbcf.tar.gz scummvm-rg350-5b0c20da9489a46fe1a89d968aada23976a2cbcf.tar.bz2 scummvm-rg350-5b0c20da9489a46fe1a89d968aada23976a2cbcf.zip |
SCI32: Provide more detail in console when a save game fails checks
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kfile.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index da4f65b1da..9de6cf840d 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -1279,10 +1279,18 @@ reg_t kCheckSaveGame32(EngineState *s, int argc, reg_t *argv) { return NULL_REG; } - if (save.version < MINIMUM_SCI32_SAVEGAME_VERSION || - save.version > CURRENT_SAVEGAME_VERSION || - save.gameVersion != gameVersion) { + if (save.version < MINIMUM_SCI32_SAVEGAME_VERSION) { + warning("Save version %d is below minimum SCI32 savegame version %d", save.version, MINIMUM_SCI32_SAVEGAME_VERSION); + return NULL_REG; + } + + if (save.version > CURRENT_SAVEGAME_VERSION) { + warning("Save version %d is above maximum SCI32 savegame version %d", save.version, CURRENT_SAVEGAME_VERSION); + return NULL_REG; + } + if (save.gameVersion != gameVersion) { + warning("Save game was created for game version %s, but the current game version is %s", save.gameVersion.c_str(), gameVersion.c_str()); return NULL_REG; } |