mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 05:38:56 +00:00
Replace one instance of strncpy with Common::strlcpy.
svn-id: r49085
This commit is contained in:
parent
759e4923d0
commit
e4d1c8a1bd
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user