aboutsummaryrefslogtreecommitdiff
path: root/backends/saves
diff options
context:
space:
mode:
authorDavid Corrales2007-07-08 17:44:26 +0000
committerDavid Corrales2007-07-08 17:44:26 +0000
commit779f702b695977b5d8c0e03b8a24bd9c107b7cfe (patch)
tree9eef3fdd22bcbc8479c54cd29094a8c7583aef7e /backends/saves
parent9bfe5d53540af7dc9bf0214202f4e35b272320ea (diff)
downloadscummvm-rg350-779f702b695977b5d8c0e03b8a24bd9c107b7cfe.tar.gz
scummvm-rg350-779f702b695977b5d8c0e03b8a24bd9c107b7cfe.tar.bz2
scummvm-rg350-779f702b695977b5d8c0e03b8a24bd9c107b7cfe.zip
Fixed a very strange bug with strings. Also added a couple sanity checks.
svn-id: r27973
Diffstat (limited to 'backends/saves')
-rw-r--r--backends/saves/default/default-saves.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp
index b58dd87d93..8cda56ded9 100644
--- a/backends/saves/default/default-saves.cpp
+++ b/backends/saves/default/default-saves.cpp
@@ -184,12 +184,11 @@ void DefaultSaveFileManager::listSavefiles(const char *prefix , bool *marks, int
FilesystemNode savePath(getSavePath());
FSList savefiles;
Common::String search(prefix);
- search += '*'; //match all files that start with the given prefix
- search.c_str(); //FIXME: subtle bug? removing this line will break things. Looks like the string isn't getting updated.
+ search = search + '*'; //match all files that start with the given prefix. += causes a strange bug.
assert(marks);
memset(marks, false, num * sizeof(bool)); //assume no savegames for this title
-
+
if(savePath.lookupFile(savefiles, savePath, search, false, true)) {
char slot[2];
int slotNum;