aboutsummaryrefslogtreecommitdiff
path: root/engines/engine.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2008-11-15 14:15:17 +0000
committerJohannes Schickel2008-11-15 14:15:17 +0000
commit28bd3e0af8e2f545d57648b8fe991767fe2b5abe (patch)
tree70bf86ce8a0c39ec43c5c81a13b7d35108624793 /engines/engine.cpp
parent3a3698f960608e8777620c9e454d6ed2282a036d (diff)
downloadscummvm-rg350-28bd3e0af8e2f545d57648b8fe991767fe2b5abe.tar.gz
scummvm-rg350-28bd3e0af8e2f545d57648b8fe991767fe2b5abe.tar.bz2
scummvm-rg350-28bd3e0af8e2f545d57648b8fe991767fe2b5abe.zip
Fixed strncpy usage.
svn-id: r35083
Diffstat (limited to 'engines/engine.cpp')
-rw-r--r--engines/engine.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 2c9835acc5..a663b1e139 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -253,6 +253,8 @@ bool Engine::shouldPerformAutoSave(int lastSaveTime) {
void Engine::errorString(const char *buf1, char *buf2, int size) {
strncpy(buf2, buf1, size);
+ if (size > 0)
+ buf2[size-1] = '\0';
}
void Engine::pauseEngine(bool pause) {