aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph-Eugene Winzer2018-03-20 20:11:20 +0100
committerEugene Sandulenko2018-03-28 17:36:57 +0200
commit157e69b8b182b46e54a38ab36fdba8ea909ffa7c (patch)
treefad5edfd718e98de2bf8ed97ce526eac28c558e1
parent132fa2fdabffcbfbd49ea90abff354296ff306e3 (diff)
downloadscummvm-rg350-157e69b8b182b46e54a38ab36fdba8ea909ffa7c.tar.gz
scummvm-rg350-157e69b8b182b46e54a38ab36fdba8ea909ffa7c.tar.bz2
scummvm-rg350-157e69b8b182b46e54a38ab36fdba8ea909ffa7c.zip
LILLIPUT: Sorts SaveStateList instead of file names
This ensures that the save files are sorted numerically instead of 'hoping' for it.
-rw-r--r--engines/lilliput/detection.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/lilliput/detection.cpp b/engines/lilliput/detection.cpp
index 5a114bc04f..a09e5f05de 100644
--- a/engines/lilliput/detection.cpp
+++ b/engines/lilliput/detection.cpp
@@ -172,7 +172,6 @@ SaveStateList LilliputMetaEngine::listSaves(const char *target) const {
pattern += "-##.SAV";
filenames = saveFileMan->listSavefiles(pattern);
- sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
char slot[3];
@@ -210,6 +209,7 @@ SaveStateList LilliputMetaEngine::listSaves(const char *target) const {
}
}
+ Common::sort(saveList.begin(), saveList.end(), SaveStateDescriptorSlotComparator());
return saveList;
}