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
This commit is contained in:
Torbjörn Andersson 2007-09-30 14:31:47 +00:00
parent 1717ab8ccd
commit 44216e2837

View file

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