aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2013-04-24 01:07:34 +0300
committerEugene Sandulenko2013-04-24 01:08:09 +0300
commitcfbc8be75735370a4e87525a9b69b4556e24b9a9 (patch)
treec893cfe9f1f45b295fc5e0f910c3e08707104ff8
parent0223742a5a0e834700b3434a47eacac0be49c6fb (diff)
downloadscummvm-rg350-cfbc8be75735370a4e87525a9b69b4556e24b9a9.tar.gz
scummvm-rg350-cfbc8be75735370a4e87525a9b69b4556e24b9a9.tar.bz2
scummvm-rg350-cfbc8be75735370a4e87525a9b69b4556e24b9a9.zip
SCUMM: Fix non-terminated string. CID 1003867
-rw-r--r--engines/scumm/script_v4.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/scumm/script_v4.cpp b/engines/scumm/script_v4.cpp
index 1de9f08168..ec3ac4b00f 100644
--- a/engines/scumm/script_v4.cpp
+++ b/engines/scumm/script_v4.cpp
@@ -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))