From e4d1c8a1bdf8db48b7232837d14c489a5045b66b Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 18 May 2010 18:16:21 +0000 Subject: Replace one instance of strncpy with Common::strlcpy. svn-id: r49085 --- engines/queen/queen.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/engines/queen/queen.cpp b/engines/queen/queen.cpp index 08b8ded3bb..10c3d56cb4 100644 --- a/engines/queen/queen.cpp +++ b/engines/queen/queen.cpp @@ -341,9 +341,8 @@ Common::Error QueenEngine::saveGameState(int slot, const char *desc) { file->writeUint32BE(0); file->writeUint32BE(dataSize); char description[32]; - memset(description, 0, 32); - strncpy(description, desc, 31); - file->write(description, 32); + Common::strlcpy(description, desc, sizeof(description)); + file->write(description, sizeof(description)); // write save data file->write(saveData, dataSize); -- cgit v1.2.3