aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/saveload.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 17f0152b75..487ed45005 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -400,7 +400,7 @@ void ScummEngine::listSavegames(bool *marks, int num) {
assert(marks);
char prefix[256];
- char slot[2];
+ char slot[3];
int slotNum;
Common::StringList filenames;
@@ -414,6 +414,7 @@ void ScummEngine::listSavegames(bool *marks, int num) {
//Obtain the last 2 digits of the filename, since they correspond to the save slot
slot[0] = file->c_str()[file->size()-2];
slot[1] = file->c_str()[file->size()-1];
+ slot[2] = 0;
slotNum = atoi(slot);
if (slotNum >= 0 && slotNum < num)