diff options
Diffstat (limited to 'engines/tinsel/saveload.cpp')
-rw-r--r-- | engines/tinsel/saveload.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/tinsel/saveload.cpp b/engines/tinsel/saveload.cpp index 88cd80b78a..c8fe5f898c 100644 --- a/engines/tinsel/saveload.cpp +++ b/engines/tinsel/saveload.cpp @@ -563,7 +563,7 @@ static void DoSave() { while (1) { Common::String fname = _vm->getSavegameFilename(ano); - strcpy(tmpName, fname.c_str()); + Common::strlcpy(tmpName, fname.c_str(), FNAMELEN); for (i = 0; i < g_numSfiles; i++) if (!strcmp(g_savedFiles[i].name, tmpName)) @@ -594,8 +594,8 @@ static void DoSave() { hdr.id = SAVEGAME_ID; hdr.size = SAVEGAME_HEADER_SIZE; hdr.ver = CURRENT_VER; - memcpy(hdr.desc, g_SaveSceneDesc, SG_DESC_LEN); - hdr.desc[SG_DESC_LEN - 1] = 0; + memset(hdr.desc, 0, SG_DESC_LEN); + Common::strlcpy(hdr.desc, g_SaveSceneDesc, SG_DESC_LEN); g_system->getTimeAndDate(hdr.dateTime); hdr.scnFlag = _vm->getFeatures() & GF_SCNFILES; hdr.language = _vm->_config->_language; |