diff options
-rw-r--r-- | engines/saga/detection.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp index 13ca63525a..e201612beb 100644 --- a/engines/saga/detection.cpp +++ b/engines/saga/detection.cpp @@ -183,7 +183,6 @@ SaveStateList SagaMetaEngine::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; int slotNum = 0; @@ -203,6 +202,8 @@ SaveStateList SagaMetaEngine::listSaves(const char *target) const { } } + // Sort saves based on slot number. + Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator()); return saveList; } |