aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo/object_v3d.cpp
diff options
context:
space:
mode:
authorArnaud Boutonné2010-12-08 21:18:48 +0000
committerArnaud Boutonné2010-12-08 21:18:48 +0000
commit9a117e3eca7fd3f6fc7254d1664bd9cc0206e0b7 (patch)
treef7db3fbe062da08e35f56f4085a3eed734de344e /engines/hugo/object_v3d.cpp
parentefc5ab5398d7ff3fabb13c6488229d98d57c767d (diff)
downloadscummvm-rg350-9a117e3eca7fd3f6fc7254d1664bd9cc0206e0b7.tar.gz
scummvm-rg350-9a117e3eca7fd3f6fc7254d1664bd9cc0206e0b7.tar.bz2
scummvm-rg350-9a117e3eca7fd3f6fc7254d1664bd9cc0206e0b7.zip
HUGO: Hopefully fix overlapping memory regions
Thanks Digitall for debugging that svn-id: r54835
Diffstat (limited to 'engines/hugo/object_v3d.cpp')
-rw-r--r--engines/hugo/object_v3d.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/hugo/object_v3d.cpp b/engines/hugo/object_v3d.cpp
index ce99ef4c48..431c71498f 100644
--- a/engines/hugo/object_v3d.cpp
+++ b/engines/hugo/object_v3d.cpp
@@ -255,9 +255,9 @@ void ObjectHandler_v3d::swapImages(int objNumb1, int objNumb2) {
seqList_t tmpSeqList[MAX_SEQUENCES];
int seqListSize = sizeof(seqList_t) * MAX_SEQUENCES;
- memcpy(tmpSeqList, _objects[objNumb1].seqList, seqListSize);
- memcpy(_objects[objNumb1].seqList, _objects[objNumb2].seqList, seqListSize);
- memcpy(_objects[objNumb2].seqList, tmpSeqList, seqListSize);
+ memmove(tmpSeqList, _objects[objNumb1].seqList, seqListSize);
+ memmove(_objects[objNumb1].seqList, _objects[objNumb2].seqList, seqListSize);
+ memmove(_objects[objNumb2].seqList, tmpSeqList, seqListSize);
restoreSeq(&_objects[objNumb1]);
_objects[objNumb2].currImagePtr = _objects[objNumb2].seqList[0].seqPtr;
_vm->_heroImage = (_vm->_heroImage == HERO) ? objNumb2 : HERO;