aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2007-09-30 14:31:47 +0000
committerTorbjörn Andersson2007-09-30 14:31:47 +0000
commit44216e2837ced21fd48612280a382b20ea5527a8 (patch)
tree76d7300a22c49b112eb703af993b515b8bbac6cd
parent1717ab8ccd371048993ad7f7fed7eb69eb409fc0 (diff)
downloadscummvm-rg350-44216e2837ced21fd48612280a382b20ea5527a8.tar.gz
scummvm-rg350-44216e2837ced21fd48612280a382b20ea5527a8.tar.bz2
scummvm-rg350-44216e2837ced21fd48612280a382b20ea5527a8.zip
Terminate the string used to hold the save slot number, or strange things may
happen. (In my case, it was looking for slot 10, 20, 30, ... instead of the correct 1, 2, 3...) svn-id: r29149
-rw-r--r--engines/saga/saveload.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/engines/saga/saveload.cpp b/engines/saga/saveload.cpp
index c68846242b..ab95bc4f6e 100644
--- a/engines/saga/saveload.cpp
+++ b/engines/saga/saveload.cpp
@@ -132,6 +132,7 @@ void SagaEngine::fillSaveList() {
//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;
slotNumber = atoi(slot);
if (slotNumber >= 0 && slotNumber < MAX_SAVES) {