mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-17 07:07:10 +00:00
Fixed bug #1808529. One must use memmove() when copying overlapping blocks of memory (blush).
svn-id: r29161
This commit is contained in:
parent
5ad7870775
commit
6351ed5379
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user