[Scummvm-cvs-logs] SF.net SVN: scummvm:[54658] scummvm/trunk/engines/hugo/detection.cpp
strangerke at users.sourceforge.net
strangerke at users.sourceforge.net
Tue Nov 30 00:57:16 CET 2010
Revision: 54658
http://scummvm.svn.sourceforge.net/scummvm/?rev=54658&view=rev
Author: strangerke
Date: 2010-11-29 23:57:15 +0000 (Mon, 29 Nov 2010)
Log Message:
-----------
HUGO: Fix save/load screens, which were always showing slot0 info
Modified Paths:
--------------
scummvm/trunk/engines/hugo/detection.cpp
Modified: scummvm/trunk/engines/hugo/detection.cpp
===================================================================
--- scummvm/trunk/engines/hugo/detection.cpp 2010-11-29 23:36:49 UTC (rev 54657)
+++ scummvm/trunk/engines/hugo/detection.cpp 2010-11-29 23:57:15 UTC (rev 54658)
@@ -209,11 +209,14 @@
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) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list