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:
parent
1717ab8ccd
commit
44216e2837
1 changed files with 1 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue