aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine
diff options
context:
space:
mode:
authorMartin Kiewitz2010-04-04 12:25:52 +0000
committerMartin Kiewitz2010-04-04 12:25:52 +0000
commit6a840638ba57d61ec6652986e6182ef41e3fa2ca (patch)
tree648648f64df75e3641f50f08ecaabd804ddea9b5 /engines/sci/engine
parent703687a9e83ce04c71f1b02e6dc64ec22d79d70d (diff)
downloadscummvm-rg350-6a840638ba57d61ec6652986e6182ef41e3fa2ca.tar.gz
scummvm-rg350-6a840638ba57d61ec6652986e6182ef41e3fa2ca.tar.bz2
scummvm-rg350-6a840638ba57d61ec6652986e6182ef41e3fa2ca.zip
SCI: put an ending NUL in strncpy, fixes castle of brain scrolling problem - should be verified by the vm gurus (waltervn and lskovlun)
svn-id: r48511
Diffstat (limited to 'engines/sci/engine')
-rw-r--r--engines/sci/engine/seg_manager.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index 55084b68ae..b02ed5083f 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -648,6 +648,8 @@ void SegManager::strncpy(reg_t dest, const char* src, size_t n) {
if (!src[i])
break;
}
+ // Put an ending NUL to terminate the string
+ setChar(dest_r, n, 0);
}
}