diff options
-rw-r--r-- | engines/scumm/detection.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index e5bbad15e6..9264a6443b 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -1271,7 +1271,6 @@ SaveStateList ScummMetaEngine::listSaves(const char *target) const { pattern += ".s##"; filenames = saveFileMan->listSavefiles(pattern); - sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..) SaveStateList saveList; for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) { @@ -1288,6 +1287,8 @@ SaveStateList ScummMetaEngine::listSaves(const char *target) const { } } + // Sort saves based on slot number. + Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator()); return saveList; } |