From 5c48c3fd2b5a229e125455b3f5c23f4773b0191e Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 15 Oct 2010 13:54:23 +0000 Subject: GOB: Remove strncpy0() Replacing it (and some strncpy + manual terminating) with Common::strlcpy() svn-id: r53490 --- engines/gob/inter_v6.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'engines/gob/inter_v6.cpp') diff --git a/engines/gob/inter_v6.cpp b/engines/gob/inter_v6.cpp index c6d0211c8f..6c02f98b98 100644 --- a/engines/gob/inter_v6.cpp +++ b/engines/gob/inter_v6.cpp @@ -24,6 +24,7 @@ */ #include "common/endian.h" +#include "common/str.h" #include "common/file.h" #include "graphics/dither.h" @@ -104,7 +105,7 @@ void Inter_v6::o6_playVmdOrMusic() { bool close; _vm->_game->_script->evalExpr(0); - strncpy0(fileName, _vm->_game->_script->getResultStr(), 127); + Common::strlcpy(fileName, _vm->_game->_script->getResultStr(), 128); VideoPlayer::Properties props; @@ -187,7 +188,7 @@ void Inter_v6::o6_openItk() { char fileName[32]; _vm->_game->_script->evalExpr(0); - strncpy0(fileName, _vm->_game->_script->getResultStr(), 27); + Common::strlcpy(fileName, _vm->_game->_script->getResultStr(), 28); if (!strchr(fileName, '.')) strcat(fileName, ".ITK"); -- cgit v1.2.3