mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 14:18:37 +00:00
SCUMM: Fix non-terminated string. CID 1003867
This commit is contained in:
parent
0223742a5a
commit
cfbc8be757
@ -415,7 +415,7 @@ void ScummEngine_v4::o4_saveLoadGame() {
|
||||
char* ptr;
|
||||
int firstSlot = (_game.id == GID_LOOM) ? STRINGID_SAVENAME1_LOOM : STRINGID_SAVENAME1;
|
||||
ptr = (char *)getStringAddress(slot + firstSlot - 1);
|
||||
strncpy(name, ptr, sizeof(name));
|
||||
Common::strlcpy(name, ptr, sizeof(name));
|
||||
}
|
||||
|
||||
if (savePreparedSavegame(slot, name))
|
||||
|
Loading…
Reference in New Issue
Block a user