aboutsummaryrefslogtreecommitdiff
path: root/common/util.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2008-11-15 03:34:08 +0000
committerJohannes Schickel2008-11-15 03:34:08 +0000
commit78e85a00f2929d2a06eedb0389aef3add6ba04d9 (patch)
tree28b45253783b9de46d5192b99b485ba1f1cb30a2 /common/util.cpp
parentf57bf13819836017d9145df87d3c86e929ecbee3 (diff)
downloadscummvm-rg350-78e85a00f2929d2a06eedb0389aef3add6ba04d9.tar.gz
scummvm-rg350-78e85a00f2929d2a06eedb0389aef3add6ba04d9.tar.bz2
scummvm-rg350-78e85a00f2929d2a06eedb0389aef3add6ba04d9.zip
Little fix for my last commit.
svn-id: r35074
Diffstat (limited to 'common/util.cpp')
-rw-r--r--common/util.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/util.cpp b/common/util.cpp
index 557106f910..3771c3433b 100644
--- a/common/util.cpp
+++ b/common/util.cpp
@@ -468,6 +468,7 @@ static void debugHelper(const char *in_buf, bool caret = true) {
g_engine->errorString(in_buf, buf, STRINGBUFLEN);
} else {
strncpy(buf, in_buf, STRINGBUFLEN);
+ buf[STRINGBUFLEN-1] = '\0';
}
if (caret)
@@ -586,6 +587,7 @@ void NORETURN error(const char *s, ...) {
g_engine->errorString(buf_input, buf_output, STRINGBUFLEN);
} else {
strncpy(buf_output, buf_input, STRINGBUFLEN);
+ buf_output[STRINGBUFLEN-1] = '\0';
}