aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche/detection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/avalanche/detection.cpp')
-rw-r--r--engines/avalanche/detection.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/avalanche/detection.cpp b/engines/avalanche/detection.cpp
index 484d148161..1ea72b613a 100644
--- a/engines/avalanche/detection.cpp
+++ b/engines/avalanche/detection.cpp
@@ -110,7 +110,6 @@ SaveStateList AvalancheMetaEngine::listSaves(const char *target) const {
pattern += ".###";
filenames = saveFileMan->listSavefiles(pattern);
- sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
for (Common::StringArray::const_iterator filename = filenames.begin(); filename != filenames.end(); ++filename) {
@@ -152,6 +151,8 @@ SaveStateList AvalancheMetaEngine::listSaves(const char *target) const {
}
}
+ // Sort saves based on slot number.
+ Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}