aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic')
-rw-r--r--engines/titanic/core/project_item.cpp2
-rw-r--r--engines/titanic/detection.cpp2
-rw-r--r--engines/titanic/main_game_window.cpp2
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);