diff options
author | Johannes Schickel | 2010-05-18 18:16:21 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-05-18 18:16:21 +0000 |
commit | e4d1c8a1bdf8db48b7232837d14c489a5045b66b (patch) | |
tree | a3a5483f8e81ccd65ca2bc4ce3a8579555c5f5dd | |
parent | 759e4923d07d2ac3eb23422aaa2a05671db4ce1c (diff) | |
download | scummvm-rg350-e4d1c8a1bdf8db48b7232837d14c489a5045b66b.tar.gz scummvm-rg350-e4d1c8a1bdf8db48b7232837d14c489a5045b66b.tar.bz2 scummvm-rg350-e4d1c8a1bdf8db48b7232837d14c489a5045b66b.zip |
Replace one instance of strncpy with Common::strlcpy.
svn-id: r49085
-rw-r--r-- | engines/queen/queen.cpp | 5 |
1 files 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); |