diff options
author | Filippos Karapetis | 2010-07-14 02:12:58 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-07-14 02:12:58 +0000 |
commit | 1cb53050835e443bad589d035b9a5f91b600e338 (patch) | |
tree | 386938d735effa0410dd10ed499c9365f2bfeb82 /engines | |
parent | b5d4056e9c0a30d73c5226857d579464d3c2be5e (diff) | |
download | scummvm-rg350-1cb53050835e443bad589d035b9a5f91b600e338.tar.gz scummvm-rg350-1cb53050835e443bad589d035b9a5f91b600e338.tar.bz2 scummvm-rg350-1cb53050835e443bad589d035b9a5f91b600e338.zip |
Fixed loading saved games from the launcher, broken in rev. 50831
svn-id: r50864
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/engine/kfile.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp index 807edc63a5..9a0827237f 100644 --- a/engines/sci/engine/kfile.cpp +++ b/engines/sci/engine/kfile.cpp @@ -603,11 +603,15 @@ reg_t kRestoreGame(EngineState *s, int argc, reg_t *argv) { debug(3, "kRestoreGame(%s,%d)", game_id.c_str(), savegameId); - if ((savegameId < 1000) || (savegameId > 1999)) { - warning("Savegame ID %d is not allowed", savegameId); - return TRUE_REG; + if (argv[0].isNull()) { + // Loading from the launcher, don't adjust the ID of the saved game + } else { + if ((savegameId < 1000) || (savegameId > 1999)) { + warning("Savegame ID %d is not allowed", savegameId); + return TRUE_REG; + } + savegameId -= 1000; } - savegameId -= 1000; Common::Array<SavegameDesc> saves; listSavegames(saves); |