diff options
Diffstat (limited to 'engines/agi/detection.cpp')
-rw-r--r-- | engines/agi/detection.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index 7d5243e023..3efd6bde65 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -261,7 +261,6 @@ SaveStateList AgiMetaEngine::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 file = filenames.begin(); file != filenames.end(); ++file) { @@ -299,6 +298,8 @@ SaveStateList AgiMetaEngine::listSaves(const char *target) const { } } + // Sort saves based on slot number. + Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator()); return saveList; } |