aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/he/script_v72he.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp
index 4385475a30..c764de7da1 100644
--- a/engines/scumm/he/script_v72he.cpp
+++ b/engines/scumm/he/script_v72he.cpp
@@ -239,10 +239,10 @@ int ScummEngine_v72he::setupStringArrayFromString(char *cStr) {
writeVar(0, 0);
- int len = strlen(cStr);
+ int len = strlen(cStr) + 1;
byte *ptr = defineArray(0, kStringArray, 0, 0, 0, len);
if (ptr != nullptr)
- strcpy((char*)ptr, cStr);
+ Common::strlcpy((char*)ptr, cStr, len);
return readVar(0);
}