aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2007-12-07 17:59:24 +0000
committerWillem Jan Palenstijn2007-12-07 17:59:24 +0000
commit4ae85163b777e4414cafcc13bfef42c6520f5034 (patch)
treeb4f52607a696d731fef1c4bae26cc90ee41d8db0 /engines/scumm
parent5d9ca5d1a7e03108745989bc7340a8dbb64cc6fa (diff)
downloadscummvm-rg350-4ae85163b777e4414cafcc13bfef42c6520f5034.tar.gz
scummvm-rg350-4ae85163b777e4414cafcc13bfef42c6520f5034.tar.bz2
scummvm-rg350-4ae85163b777e4414cafcc13bfef42c6520f5034.zip
fix unterminated string (causing intermittent savegame listing problems in scumm)
svn-id: r29748
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)