diff options
author | Christopher Page | 2008-07-31 21:56:05 +0000 |
---|---|---|
committer | Christopher Page | 2008-07-31 21:56:05 +0000 |
commit | a51f45407659bba43254b466d20b6af2e8f17ffd (patch) | |
tree | 3c2442a87ffefca513d5091e77c0d2f2cdeb026d /engines/sky | |
parent | 8721102dedd1eb60d5ff2e0452b669e9fcd88f96 (diff) | |
download | scummvm-rg350-a51f45407659bba43254b466d20b6af2e8f17ffd.tar.gz scummvm-rg350-a51f45407659bba43254b466d20b6af2e8f17ffd.tar.bz2 scummvm-rg350-a51f45407659bba43254b466d20b6af2e8f17ffd.zip |
Added check for valid save slots, when loading savestates using -x
svn-id: r33483
Diffstat (limited to 'engines/sky')
-rw-r--r-- | engines/sky/sky.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index 92df584f6f..44347cf9a7 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -343,8 +343,11 @@ int SkyEngine::go() { _keyPressed.reset(); uint16 result = 0; - if (ConfMan.hasKey("save_slot") && ConfMan.getInt("save_slot") >= 0) - result = _skyControl->quickXRestore(ConfMan.getInt("save_slot")); + if (ConfMan.hasKey("save_slot")) { + int saveSlot = ConfMan.getInt("save_slot"); + if (saveSlot >= 0 && saveSlot <= 999) + result = _skyControl->quickXRestore(ConfMan.getInt("save_slot")); + } if (result != GAME_RESTORED) { bool introSkipped = false; |