Skip to content

Commit

Permalink
SCUMM: Fix non-terminated string. CID 1003867
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Apr 23, 2013
1 parent 0223742 commit cfbc8be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion engines/scumm/script_v4.cpp
Expand Up @@ -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))
Expand Down

0 comments on commit cfbc8be

Please sign in to comment.