From b47c50a703aabace27eb47317c5f3424e3b4c22d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 27 Apr 2013 08:43:06 +0300 Subject: AGI: Null terminate string. CID 1003888 --- engines/agi/op_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp index 0245f3936a..2366d97a82 100644 --- a/engines/agi/op_cmd.cpp +++ b/engines/agi/op_cmd.cpp @@ -1219,7 +1219,7 @@ void cmdWander(AgiGame *state, uint8 *p) { void cmdSetGameID(AgiGame *state, uint8 *p) { if (state->_curLogic->texts && (p0 - 1) <= state->_curLogic->numTexts) - strncpy(state->id, state->_curLogic->texts[p0 - 1], 8); + Common::strlcpy(state->id, state->_curLogic->texts[p0 - 1], 8); else state->id[0] = 0; -- cgit v1.2.3