diff options
Diffstat (limited to 'engines/touche')
-rw-r--r-- | engines/touche/touche.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/engines/touche/touche.cpp b/engines/touche/touche.cpp index a4a9b7df92..a7a362f2b1 100644 --- a/engines/touche/touche.cpp +++ b/engines/touche/touche.cpp @@ -252,10 +252,13 @@ void ToucheEngine::mainLoop() { _inp_rightMouseButtonPressed = false; if (ConfMan.hasKey("save_slot")) { - loadGameState(ConfMan.getInt("save_slot")); - _newEpisodeNum = 0; - resetSortedKeyCharsTable(); - showCursor(true); + int saveSlot = ConfMan.getInt("save_slot"); + if (saveSlot >= 0 && saveSlot <= 99) { + loadGameState(saveSlot); + _newEpisodeNum = 0; + resetSortedKeyCharsTable(); + showCursor(true); + } } else { _newEpisodeNum = ConfMan.getInt("boot_param"); if (_newEpisodeNum == 0) { |