aboutsummaryrefslogtreecommitdiff
path: root/engines/sci
diff options
context:
space:
mode:
authorWalter van Niftrik2010-06-04 10:51:27 +0000
committerWalter van Niftrik2010-06-04 10:51:27 +0000
commit997fdac4271aac6a345bbdd0782d55d48ed0b400 (patch)
treec0f31c13a2c9b98e0c01593496e7f57ca512b761 /engines/sci
parenta8acf7468c8f795355bb85962052eb8c02e2a4de (diff)
downloadscummvm-rg350-997fdac4271aac6a345bbdd0782d55d48ed0b400.tar.gz
scummvm-rg350-997fdac4271aac6a345bbdd0782d55d48ed0b400.tar.bz2
scummvm-rg350-997fdac4271aac6a345bbdd0782d55d48ed0b400.zip
SCI: Replace strncpy with Common::strlcpy
svn-id: r49425
Diffstat (limited to 'engines/sci')
-rw-r--r--engines/sci/engine/kfile.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/engines/sci/engine/kfile.cpp b/engines/sci/engine/kfile.cpp
index 4be92015ab..c48fb4035f 100644
--- a/engines/sci/engine/kfile.cpp
+++ b/engines/sci/engine/kfile.cpp
@@ -282,8 +282,7 @@ void listSavegames(Common::Array<SavegameDesc> &saves) {
if (meta.savegame_name.lastChar() == '\n')
meta.savegame_name.deleteLastChar();
- strncpy(desc.name, meta.savegame_name.c_str(), SCI_MAX_SAVENAME_LENGTH - 1);
- desc.name[SCI_MAX_SAVENAME_LENGTH - 1] = 0;
+ Common::strlcpy(desc.name, meta.savegame_name.c_str(), SCI_MAX_SAVENAME_LENGTH);
debug(3, "Savegame in file %s ok, id %d", filename.c_str(), desc.id);