mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 01:15:37 +00:00
fix issue #9
This commit is contained in:
parent
3e5ebc58a0
commit
f9b9dfbce9
|
@ -392,6 +392,7 @@ uc_err uc_hook_del(uch handle, uch *h2);
|
|||
|
||||
@handle: handle returned by uc_open()
|
||||
@address: starting address of the new memory region to be mapped in.
|
||||
This address will be round down to 8KB boundary
|
||||
@size: size of the new memory region to be mapped in. This will be round up to
|
||||
the next 8KB boundary.
|
||||
|
||||
|
|
2
uc.c
2
uc.c
|
@ -553,7 +553,7 @@ uc_err uc_mem_map(uch handle, uint64_t address, size_t size)
|
|||
return UC_ERR_UCH;
|
||||
|
||||
// align to 8KB boundary
|
||||
map_begin[map_count] = address & (~ (8*1024));
|
||||
map_begin[map_count] = address & (~ (8*1024 - 1));
|
||||
s = (size + 8*1024 - 1) & (~ (8*1024));
|
||||
map_end[map_count] = s + map_begin[map_count];
|
||||
uc->memory_map(uc, map_begin[map_count], s);
|
||||
|
|
Loading…
Reference in a new issue