mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
TITANIC: Allow last saved game to be loaded
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user