From 7a88744b749e45efa8fb7339cf0989c5572f3863 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sat, 7 Mar 2009 13:40:00 +0000 Subject: Patch #2671477: Fix wrong usage of strncat svn-id: r39184 --- engines/scumm/he/logic_he.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/scumm/he') diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp index f7f4c1effc..9efb1c697c 100644 --- a/engines/scumm/he/logic_he.cpp +++ b/engines/scumm/he/logic_he.cpp @@ -86,9 +86,9 @@ int32 LogicHE::dispatch(int op, int numArgs, int32 *args) { for (int i = 1; i < numArgs; i++) { snprintf(tmp, 32, ", %d", args[i]); - strncat(str, tmp, 256); + strncat(str, tmp, sizeof(str) - strlen(str) - 1); } - strncat(str, "])", 256); + strncat(str, "])", sizeof(str) - strlen(str) - 1); debug(0, "%s", str); #else -- cgit v1.2.3