aboutsummaryrefslogtreecommitdiff
path: root/engines/agos
diff options
context:
space:
mode:
authorTorbjörn Andersson2007-11-20 18:46:01 +0000
committerTorbjörn Andersson2007-11-20 18:46:01 +0000
commitf7fd695e794ad810fbc83affb26e4434f8f6b206 (patch)
tree4dfdb5e6e841a3fd8d47bcf4176809a13aae82ae /engines/agos
parent338f8aa99eb3221fcc6571e66e3ac70a086b8323 (diff)
downloadscummvm-rg350-f7fd695e794ad810fbc83affb26e4434f8f6b206.tar.gz
scummvm-rg350-f7fd695e794ad810fbc83affb26e4434f8f6b206.tar.bz2
scummvm-rg350-f7fd695e794ad810fbc83affb26e4434f8f6b206.zip
Fixed unterminated string in countSaveGames(), which may be the cause of the
problem with Feeble Files savegames not being shown that was described on the forum recently. svn-id: r29580
Diffstat (limited to 'engines/agos')
-rw-r--r--engines/agos/saveload.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/agos/saveload.cpp b/engines/agos/saveload.cpp
index 3ece2caecf..c4634be6d6 100644
--- a/engines/agos/saveload.cpp
+++ b/engines/agos/saveload.cpp
@@ -40,7 +40,7 @@ int AGOSEngine::countSaveGames() {
Common::InSaveFile *f;
Common::StringList filenames;
uint i = 1;
- char slot[3];
+ char slot[4];
int slotNum;
bool marks[256];
@@ -55,6 +55,7 @@ int AGOSEngine::countSaveGames() {
slot[0] = file->c_str()[file->size()-3];
slot[1] = file->c_str()[file->size()-2];
slot[2] = file->c_str()[file->size()-1];
+ slot[3] = '\0';
slotNum = atoi(slot);
if (slotNum >= 0 && slotNum < 256)