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
This commit is contained in:
Torbjörn Andersson 2007-11-20 18:46:01 +00:00
parent 338f8aa99e
commit f7fd695e79

View file

@ -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)