aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicola Mettifogo2007-10-07 07:11:09 +0000
committerNicola Mettifogo2007-10-07 07:11:09 +0000
commit6351ed53790806bfb685311a1b91376e830e312a (patch)
treea843a7c0494e5290862b5eaa8190cdb8b46ce749
parent5ad7870775ef8eb1122e22fa5f12383536e7a01d (diff)
downloadscummvm-rg350-6351ed53790806bfb685311a1b91376e830e312a.tar.gz
scummvm-rg350-6351ed53790806bfb685311a1b91376e830e312a.tar.bz2
scummvm-rg350-6351ed53790806bfb685311a1b91376e830e312a.zip
Fixed bug #1808529. One must use memmove() when copying overlapping blocks of memory (blush).
svn-id: r29161
-rw-r--r--engines/parallaction/inventory.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/parallaction/inventory.cpp b/engines/parallaction/inventory.cpp
index 5a1baa6ace..21c1da1a70 100644
--- a/engines/parallaction/inventory.cpp
+++ b/engines/parallaction/inventory.cpp
@@ -302,7 +302,7 @@ void Inventory::removeItem(ItemName name) {
_numItems--;
if (_numItems != pos) {
- memcpy(&_items[pos], &_items[pos+1], (_numItems - pos) * sizeof(InventoryItem));
+ memmove(&_items[pos], &_items[pos+1], (_numItems - pos) * sizeof(InventoryItem));
}
_items[_numItems]._id = 0;