From 1cb53050835e443bad589d035b9a5f91b600e338 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 14 Jul 2010 02:12:58 +0000 Subject: Fixed loading saved games from the launcher, broken in rev. 50831 svn-id: r50864 --- engines/sci/engine/kfile.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'engines') 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 saves; listSavegames(saves); -- cgit v1.2.3