aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Boutonné2010-11-29 23:57:15 +0000
committerArnaud Boutonné2010-11-29 23:57:15 +0000
commit1fbd80b1e3eb442df2203d27269623c964a22bad (patch)
tree2231580956b938f91f8fa0a466bb49d256daadf3
parent2c824e3311521979b9f3afe38c62fe60885e952d (diff)
downloadscummvm-rg350-1fbd80b1e3eb442df2203d27269623c964a22bad.tar.gz
scummvm-rg350-1fbd80b1e3eb442df2203d27269623c964a22bad.tar.bz2
scummvm-rg350-1fbd80b1e3eb442df2203d27269623c964a22bad.zip
HUGO: Fix save/load screens, which were always showing slot0 info
svn-id: r54658
-rw-r--r--engines/hugo/detection.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/hugo/detection.cpp b/engines/hugo/detection.cpp
index 05fe984615..d567275981 100644
--- a/engines/hugo/detection.cpp
+++ b/engines/hugo/detection.cpp
@@ -209,11 +209,14 @@ SaveStateList HugoMetaEngine::listSaves(const char *target) const {
sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..)
SaveStateList saveList;
+ char slot[3];
int slotNum = 0;
for (Common::StringArray::const_iterator filename = filenames.begin(); filename != filenames.end(); ++filename) {
- // Obtain the last 3 digits of the filename, since they correspond to the save slot
- slotNum = atoi(filename->c_str() + filename->size() - 3);
-
+ slot[0] = filename->c_str()[filename->size() - 6];
+ slot[1] = filename->c_str()[filename->size() - 5];
+ slot[2] = '\0';
+ // Obtain the last 2 digits of the filename (without extension), since they correspond to the save slot
+ slotNum = atoi(slot);
if (slotNum >= 0 && slotNum <= getMaximumSaveSlot()) {
Common::InSaveFile *file = saveFileMan->openForLoading(*filename);
if (file) {