diff options
author | Nicola Mettifogo | 2007-10-07 07:11:09 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-10-07 07:11:09 +0000 |
commit | 6351ed53790806bfb685311a1b91376e830e312a (patch) | |
tree | a843a7c0494e5290862b5eaa8190cdb8b46ce749 | |
parent | 5ad7870775ef8eb1122e22fa5f12383536e7a01d (diff) | |
download | scummvm-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.cpp | 2 |
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; |