aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-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)