diff options
author | David Fioramonti | 2017-08-03 15:56:24 -0700 |
---|---|---|
committer | David Fioramonti | 2017-08-03 16:14:20 -0700 |
commit | eb050826174c1996e9d052d554c946420c192bc8 (patch) | |
tree | 01df95b6317820b57d38c24e86d3972d970515e8 /engines | |
parent | 293df6a68f9e10f1fa43139306eaf73af7ab6c09 (diff) | |
download | scummvm-rg350-eb050826174c1996e9d052d554c946420c192bc8.tar.gz scummvm-rg350-eb050826174c1996e9d052d554c946420c192bc8.tar.bz2 scummvm-rg350-eb050826174c1996e9d052d554c946420c192bc8.zip |
TITANIC: Allow last saved game to be loaded
Diffstat (limited to 'engines')
-rw-r--r-- | engines/titanic/core/project_item.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/detection.cpp | 2 | ||||
-rw-r--r-- | engines/titanic/main_game_window.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/engines/titanic/core/project_item.cpp b/engines/titanic/core/project_item.cpp index 2655b6cbd5..b16d076f14 100644 --- a/engines/titanic/core/project_item.cpp +++ b/engines/titanic/core/project_item.cpp @@ -463,7 +463,7 @@ SaveStateList CProjectItem::getSavegameList(const Common::String &target) { const char *ext = strrchr(file->c_str(), '.'); int slot = ext ? atoi(ext + 1) : -1; - if (slot >= 0 && slot < MAX_SAVES) { + if (slot >= 0 && slot <= MAX_SAVES) { Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(*file); if (in) { diff --git a/engines/titanic/detection.cpp b/engines/titanic/detection.cpp index 6c3177d718..098c20ca1d 100644 --- a/engines/titanic/detection.cpp +++ b/engines/titanic/detection.cpp @@ -118,7 +118,7 @@ SaveStateList TitanicMetaEngine::listSaves(const char *target) const { const char *ext = strrchr(file->c_str(), '.'); int slot = ext ? atoi(ext + 1) : -1; - if (slot >= 0 && slot < MAX_SAVES) { + if (slot >= 0 && slot <= MAX_SAVES) { Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(*file); if (in) { diff --git a/engines/titanic/main_game_window.cpp b/engines/titanic/main_game_window.cpp index b578bb942e..559e186f70 100644 --- a/engines/titanic/main_game_window.cpp +++ b/engines/titanic/main_game_window.cpp @@ -117,7 +117,7 @@ int CMainGameWindow::selectSavegame() { bool hasSavegames = false; // Loop through save slots to find any existing save slots - for (int idx = 0; idx < MAX_SAVES; ++idx) { + for (int idx = 0; idx <= MAX_SAVES; ++idx) { CString saveName = g_vm->getSavegameName(idx); if (!saveName.empty()) { dialog.addSavegame(idx, saveName); |