diff options
author | D G Turner | 2019-10-05 01:32:41 +0100 |
---|---|---|
committer | D G Turner | 2019-10-05 01:32:41 +0100 |
commit | 03380c0e8a4daf13c51186bcebccccc983c9ed96 (patch) | |
tree | 98015cc6bf50b49b396e541470b6d952ad1c86b5 | |
parent | 3911b564448417cf52e7153339f3cb1714d0917d (diff) | |
download | scummvm-rg350-03380c0e8a4daf13c51186bcebccccc983c9ed96.tar.gz scummvm-rg350-03380c0e8a4daf13c51186bcebccccc983c9ed96.tar.bz2 scummvm-rg350-03380c0e8a4daf13c51186bcebccccc983c9ed96.zip |
LAB: Replace memcpy of overlapping region with memmove
The result of using memcpy when source and destination overlap is
not clearly defined, so use memmove instead which avoids this problem.
-rw-r--r-- | engines/lab/engine.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp index 11a64114b5..793a333a54 100644 --- a/engines/lab/engine.cpp +++ b/engines/lab/engine.cpp @@ -825,7 +825,7 @@ void LabEngine::processMainButton(uint16 &curInv, uint16 &lastInv, uint16 &oldDi if (!intersect) { if (_numCrumbs == MAX_CRUMBS) { _numCrumbs = MAX_CRUMBS - 1; - memcpy(&_breadCrumbs[0], &_breadCrumbs[1], _numCrumbs * sizeof _breadCrumbs[0]); + memmove(&_breadCrumbs[0], &_breadCrumbs[1], _numCrumbs * sizeof _breadCrumbs[0]); } _breadCrumbs[_numCrumbs]._crumbRoomNum = _roomNum; |