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/inter_v1.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/inter_v1.cpp')
-rw-r--r-- | engines/gob/inter_v1.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index 3bf7fc8fd4..1fe44758df 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -24,6 +24,7 @@ */ #include "common/endian.h" +#include "common/str.h" #include "common/file.h" #include "gob/gob.h" @@ -971,7 +972,7 @@ bool Inter_v1::o1_loadTot(OpFuncParams ¶ms) { if ((_vm->_game->_script->peekByte() & 0x80) != 0) { _vm->_game->_script->skip(1); _vm->_game->_script->evalExpr(0); - strncpy0(buf, _vm->_game->_script->getResultStr(), 15); + Common::strlcpy(buf, _vm->_game->_script->getResultStr(), 16); } else { size = _vm->_game->_script->readInt8(); memcpy(buf, _vm->_game->_script->readString(size), size); @@ -1512,7 +1513,7 @@ bool Inter_v1::o1_strToLong(OpFuncParams ¶ms) { int32 res; strVar = _vm->_game->_script->readVarIndex(); - strncpy0(str, GET_VARO_STR(strVar), 19); + Common::strlcpy(str, GET_VARO_STR(strVar), 20); res = atoi(str); destVar = _vm->_game->_script->readVarIndex(); |