From f7fd695e794ad810fbc83affb26e4434f8f6b206 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Tue, 20 Nov 2007 18:46:01 +0000 Subject: 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 --- engines/agos/saveload.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engines/agos') 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) -- cgit v1.2.3