diff options
author | Willem Jan Palenstijn | 2009-03-07 13:40:00 +0000 |
---|---|---|
committer | Willem Jan Palenstijn | 2009-03-07 13:40:00 +0000 |
commit | 7a88744b749e45efa8fb7339cf0989c5572f3863 (patch) | |
tree | 133d398f3952e2aa2069d49e783c5528fe0a8112 /engines/saga | |
parent | 32e49fe2cf9c9fc1036b583dd39b8e2c351f81b4 (diff) | |
download | scummvm-rg350-7a88744b749e45efa8fb7339cf0989c5572f3863.tar.gz scummvm-rg350-7a88744b749e45efa8fb7339cf0989c5572f3863.tar.bz2 scummvm-rg350-7a88744b749e45efa8fb7339cf0989c5572f3863.zip |
Patch #2671477: Fix wrong usage of strncat
svn-id: r39184
Diffstat (limited to 'engines/saga')
-rw-r--r-- | engines/saga/sfuncs.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp index a274983de1..9d298818cd 100644 --- a/engines/saga/sfuncs.cpp +++ b/engines/saga/sfuncs.cpp @@ -1570,9 +1570,9 @@ void Script::sfStub(const char *name, ScriptThread *thread, int nArgs) { for (int i = 0; i < nArgs; i++) { snprintf(buf1, 100, "%d", thread->pop()); - strncat(buf, buf1, 256); + strncat(buf, buf1, sizeof(buf) - strlen(buf) - 1); if (i + 1 < nArgs) - strncat(buf, ", ", 256); + strncat(buf, ", ", sizeof(buf) - strlen(buf) - 1); } debug(0, "%s)", buf); |