diff options
author | Colin Snover | 2017-01-05 22:46:13 -0600 |
---|---|---|
committer | Colin Snover | 2017-01-06 13:13:59 -0600 |
commit | 809dcf12ab354a3ad0da865b10510d476a4212b4 (patch) | |
tree | 93482907b63f6227aa449d7a76c1ab8d642c031b /engines/sci/engine/segment.h | |
parent | d9b2b7d484b5dda3dad91aef20da425897698b84 (diff) | |
download | scummvm-rg350-809dcf12ab354a3ad0da865b10510d476a4212b4.tar.gz scummvm-rg350-809dcf12ab354a3ad0da865b10510d476a4212b4.tar.bz2 scummvm-rg350-809dcf12ab354a3ad0da865b10510d476a4212b4.zip |
SCI32: Fix overlapped memory copies in SciString
Diffstat (limited to 'engines/sci/engine/segment.h')
-rw-r--r-- | engines/sci/engine/segment.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/engine/segment.h b/engines/sci/engine/segment.h index 81be9332c2..7e2189ea68 100644 --- a/engines/sci/engine/segment.h +++ b/engines/sci/engine/segment.h @@ -804,7 +804,7 @@ public: while (*source != '\0' && *source != showChar && *source <= kWhitespaceBoundary) { ++source; } - strcpy((char *)target, (char *)source); + memmove(target, source, Common::strnlen((char *)source, _size - 1) + 1); } if (flags & kArrayTrimRight) { |