Make sure that savegame names are 0-terminated
svn-id: r35220
This commit is contained in:
parent
b66a9d4e03
commit
b471aab57d
1 changed files with 1 additions and 0 deletions
|
@ -51,6 +51,7 @@ bool DrasculaEngine::saveLoadScreen() {
|
|||
}
|
||||
for (n = 0; n < NUM_SAVES; n++) {
|
||||
strncpy(names[n], sav->readLine().c_str(), 23);
|
||||
names[n][22] = '\0'; // make sure the savegame name is 0-terminated
|
||||
}
|
||||
delete sav;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue