mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 11:45:36 +00:00
Fix 8k alignment mask computation in uc_mem_map
This commit is contained in:
parent
055dc25633
commit
c8f60221fa
4
uc.c
4
uc.c
|
@ -553,8 +553,8 @@ uc_err uc_mem_map(uch handle, uint64_t address, size_t size)
|
||||||
return UC_ERR_UCH;
|
return UC_ERR_UCH;
|
||||||
|
|
||||||
// align to 8KB boundary
|
// 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));
|
s = (size + 8*1024 - 1) & (~ (8*1024 - 1));
|
||||||
map_end[map_count] = s + map_begin[map_count];
|
map_end[map_count] = s + map_begin[map_count];
|
||||||
uc->memory_map(uc, map_begin[map_count], s);
|
uc->memory_map(uc, map_begin[map_count], s);
|
||||||
map_count++;
|
map_count++;
|
||||||
|
|
Loading…
Reference in a new issue