From 73bc268036a2d7ad44ecfea2e7fac185ccfed37a Mon Sep 17 00:00:00 2001 From: Chris Eagle Date: Mon, 24 Aug 2015 00:41:56 -0700 Subject: [PATCH] Fix 8k alignment mask computation --- uc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 uc.c diff --git a/uc.c b/uc.c old mode 100644 new mode 100755 index aa553e8b..92c0d72a --- a/uc.c +++ b/uc.c @@ -553,8 +553,8 @@ 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)); - s = (size + 8*1024 - 1) & (~ (8*1024)); + map_begin[map_count] = address & (~ (8*1024 - 1)); + s = (size + 8*1024 - 1) & (~ (8*1024 - 1)); map_end[map_count] = s + map_begin[map_count]; uc->memory_map(uc, map_begin[map_count], s); map_count++;