diff options
-rw-r--r-- | engines/hugo/object_v1d.cpp | 6 | ||||
-rw-r--r-- | engines/hugo/object_v1w.cpp | 6 | ||||
-rw-r--r-- | engines/hugo/object_v3d.cpp | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/engines/hugo/object_v1d.cpp b/engines/hugo/object_v1d.cpp index 669c4fb131..7b42263759 100644 --- a/engines/hugo/object_v1d.cpp +++ b/engines/hugo/object_v1d.cpp @@ -361,9 +361,9 @@ void ObjectHandler_v1d::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); _objects[objNumb1].currImagePtr = _objects[objNumb1].seqList[0].seqPtr; _objects[objNumb2].currImagePtr = _objects[objNumb2].seqList[0].seqPtr; _vm->_heroImage = (_vm->_heroImage == HERO) ? objNumb2 : HERO; diff --git a/engines/hugo/object_v1w.cpp b/engines/hugo/object_v1w.cpp index b47bd0e488..708376a01b 100644 --- a/engines/hugo/object_v1w.cpp +++ b/engines/hugo/object_v1w.cpp @@ -371,9 +371,9 @@ void ObjectHandler_v1w::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; 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; |