diff options
author | Johannes Schickel | 2010-05-31 18:05:39 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-05-31 18:05:39 +0000 |
commit | 5bb4fadc4c85e14b5881fb3849ea32233dba91ed (patch) | |
tree | 23c98147d9370ca2c29dbfee57898d33dbaa7c60 /engines | |
parent | d1da820a75a3a8f921c0b7cd1ae26bf6f7cb6729 (diff) | |
download | scummvm-rg350-5bb4fadc4c85e14b5881fb3849ea32233dba91ed.tar.gz scummvm-rg350-5bb4fadc4c85e14b5881fb3849ea32233dba91ed.tar.bz2 scummvm-rg350-5bb4fadc4c85e14b5881fb3849ea32233dba91ed.zip |
Fix change in r49356, Common::strlcpy should only be used on zero terminated source strings.
The original code change with r49086 did only aimed at zero terminating
the szFilename string (as the comment suggests), so I now changed it
to use memcpy and a manual placement of the terminating zero.
svn-id: r49357
Diffstat (limited to 'engines')
-rw-r--r-- | engines/tinsel/handle.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/tinsel/handle.cpp b/engines/tinsel/handle.cpp index b006f718b7..60eb08a2dd 100644 --- a/engines/tinsel/handle.cpp +++ b/engines/tinsel/handle.cpp @@ -288,7 +288,8 @@ void LoadFile(MEMHANDLE *pH) { } // extract and zero terminate the filename - Common::strlcpy(szFilename, pH->szName, sizeof(pH->szName)+1); + memcpy(szFilename, pH->szName, sizeof(pH->szName)); + szFilename[sizeof(pH->szName)] = 0; if (f.open(szFilename)) { // read the data |