This commit is contained in:
Nguyen Anh Quynh
2015-08-24 00:52:00 +08:00
parent 3e5ebc58a0
commit f9b9dfbce9
2 changed files with 2 additions and 1 deletions

2
uc.c
View File

@ -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);