mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-24 16:48:30 +00:00
fixed memcpy that should be memmove
This commit is contained in:
parent
bfbe91834e
commit
95beec805c
1 changed files with 1 additions and 1 deletions
|
@ -85,7 +85,7 @@ void memory_unmap(struct uc_struct *uc, MemoryRegion *mr)
|
||||||
if (uc->mapped_blocks[i] == mr) {
|
if (uc->mapped_blocks[i] == mr) {
|
||||||
uc->mapped_block_count--;
|
uc->mapped_block_count--;
|
||||||
//shift remainder of array down over deleted pointer
|
//shift remainder of array down over deleted pointer
|
||||||
memcpy(&uc->mapped_blocks[i], &uc->mapped_blocks[i + 1], sizeof(MemoryRegion*) * (uc->mapped_block_count - i));
|
memmove(&uc->mapped_blocks[i], &uc->mapped_blocks[i + 1], sizeof(MemoryRegion*) * (uc->mapped_block_count - i));
|
||||||
mr->destructor(mr);
|
mr->destructor(mr);
|
||||||
g_free((char *)mr->name);
|
g_free((char *)mr->name);
|
||||||
g_free(mr->ioeventfds);
|
g_free(mr->ioeventfds);
|
||||||
|
|
Loading…
Reference in a new issue