SCUMM: Fix non-terminated string. CID 1003867

This commit is contained in:
Eugene Sandulenko 2013-04-24 01:07:34 +03:00
parent 0223742a5a
commit cfbc8be757

View File

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