diff options
author | Sven Hesse | 2010-10-15 13:54:23 +0000 |
---|---|---|
committer | Sven Hesse | 2010-10-15 13:54:23 +0000 |
commit | 5c48c3fd2b5a229e125455b3f5c23f4773b0191e (patch) | |
tree | e046dd5ca61d6f7f78eb61dd9f7b9771168e6dc3 /engines/gob/variables.cpp | |
parent | 04973e85be84db4ac5a71a7012eb68c8e52af3c4 (diff) | |
download | scummvm-rg350-5c48c3fd2b5a229e125455b3f5c23f4773b0191e.tar.gz scummvm-rg350-5c48c3fd2b5a229e125455b3f5c23f4773b0191e.tar.bz2 scummvm-rg350-5c48c3fd2b5a229e125455b3f5c23f4773b0191e.zip |
GOB: Remove strncpy0()
Replacing it (and some strncpy + manual terminating) with
Common::strlcpy()
svn-id: r53490
Diffstat (limited to 'engines/gob/variables.cpp')
-rw-r--r-- | engines/gob/variables.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/gob/variables.cpp b/engines/gob/variables.cpp index 11c5f08bb2..ebcc22c6a1 100644 --- a/engines/gob/variables.cpp +++ b/engines/gob/variables.cpp @@ -24,6 +24,7 @@ */ #include "common/endian.h" +#include "common/str.h" #include "gob/gob.h" #include "gob/variables.h" @@ -112,7 +113,7 @@ uint32 Variables::readOff32(uint32 offset) const { } void Variables::readOffString(uint32 offset, char *value, uint32 length) { - strncpy0(value, (const char *)(_vars + offset), length - 1); + Common::strlcpy(value, (const char *)(_vars + offset), length); } const uint8 *Variables::getAddressVar8(uint32 var) const { |