SCUMM: Fix non-terminated string. CID 1003867
This commit is contained in:
parent
0223742a5a
commit
cfbc8be757
1 changed files with 1 additions and 1 deletions
|
@ -415,7 +415,7 @@ void ScummEngine_v4::o4_saveLoadGame() {
|
||||||
char* ptr;
|
char* ptr;
|
||||||
int firstSlot = (_game.id == GID_LOOM) ? STRINGID_SAVENAME1_LOOM : STRINGID_SAVENAME1;
|
int firstSlot = (_game.id == GID_LOOM) ? STRINGID_SAVENAME1_LOOM : STRINGID_SAVENAME1;
|
||||||
ptr = (char *)getStringAddress(slot + firstSlot - 1);
|
ptr = (char *)getStringAddress(slot + firstSlot - 1);
|
||||||
strncpy(name, ptr, sizeof(name));
|
Common::strlcpy(name, ptr, sizeof(name));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (savePreparedSavegame(slot, name))
|
if (savePreparedSavegame(slot, name))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue