diff options
author | Johannes Schickel | 2016-01-26 02:43:26 +0100 |
---|---|---|
committer | Johannes Schickel | 2016-01-26 16:35:30 +0100 |
commit | 0a670db0189e27a6ad7adc24f21c065a208309a7 (patch) | |
tree | 220de63b3887178a6e7bc362a16432bb8acdf9e9 /engines/sky | |
parent | add6c998ab92ceff0e56b554efd580f88ec29b26 (diff) | |
download | scummvm-rg350-0a670db0189e27a6ad7adc24f21c065a208309a7.tar.gz scummvm-rg350-0a670db0189e27a6ad7adc24f21c065a208309a7.tar.bz2 scummvm-rg350-0a670db0189e27a6ad7adc24f21c065a208309a7.zip |
SKY: Only request actual save slots in listSaves.
Diffstat (limited to 'engines/sky')
-rw-r--r-- | engines/sky/detection.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/engines/sky/detection.cpp b/engines/sky/detection.cpp index 4c7bb2dc17..8a8967629d 100644 --- a/engines/sky/detection.cpp +++ b/engines/sky/detection.cpp @@ -222,7 +222,7 @@ SaveStateList SkyMetaEngine::listSaves(const char *target) const { // Find all saves Common::StringArray filenames; - filenames = saveFileMan->listSavefiles("SKY-VM.???"); + filenames = saveFileMan->listSavefiles("SKY-VM.###"); sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..) // Slot 0 is the autosave, if it exists. @@ -235,13 +235,11 @@ SaveStateList SkyMetaEngine::listSaves(const char *target) const { // Extract the extension Common::String ext = file->c_str() + file->size() - 3; ext.toUppercase(); - if (Common::isDigit(ext[0]) && Common::isDigit(ext[1]) && Common::isDigit(ext[2])) { - int slotNum = atoi(ext.c_str()); - Common::InSaveFile *in = saveFileMan->openForLoading(*file); - if (in) { - saveList.push_back(SaveStateDescriptor(slotNum+1, savenames[slotNum])); - delete in; - } + int slotNum = atoi(ext.c_str()); + Common::InSaveFile *in = saveFileMan->openForLoading(*file); + if (in) { + saveList.push_back(SaveStateDescriptor(slotNum+1, savenames[slotNum])); + delete in; } } |