aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sky/detection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/sky/detection.cpp b/engines/sky/detection.cpp
index 8a8967629d..d85299cc24 100644
--- a/engines/sky/detection.cpp
+++ b/engines/sky/detection.cpp
@@ -223,7 +223,6 @@ SaveStateList SkyMetaEngine::listSaves(const char *target) const {
// Find all saves
Common::StringArray filenames;
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.
// TODO: Check for the existence of the autosave -- but this require us
@@ -243,6 +242,8 @@ SaveStateList SkyMetaEngine::listSaves(const char *target) const {
}
}
+ // Sort saves based on slot number.
+ Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}