GOB: Remove strncpy0()

Replacing it (and some strncpy + manual terminating) with
Common::strlcpy()

svn-id: r53490
This commit is contained in:
Sven Hesse 2010-10-15 13:54:23 +00:00
parent 04973e85be
commit 5c48c3fd2b
15 changed files with 47 additions and 42 deletions

View file

@ -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 {