diff options
-rw-r--r-- | engines/teenagent/detection.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/teenagent/detection.cpp b/engines/teenagent/detection.cpp index 4fd3a06311..cefc1a89d3 100644 --- a/engines/teenagent/detection.cpp +++ b/engines/teenagent/detection.cpp @@ -128,7 +128,6 @@ public: pattern += ".##"; Common::StringArray filenames = g_system->getSavefileManager()->listSavefiles(pattern); - Common::sort(filenames.begin(), filenames.end()); SaveStateList saveList; for (Common::StringArray::const_iterator file = filenames.begin(); file != filenames.end(); ++file) { @@ -145,6 +144,8 @@ public: saveList.push_back(SaveStateDescriptor(slot, buf)); } } + // Sort saves based on slot number. + Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator()); return saveList; } |