uc_mem_unmap returns proper error code & fixes #863 (#864)

This commit is contained in:
Ficture Seven 2017-08-01 14:59:55 +04:00 committed by Nguyen Anh Quynh
parent de7bf524f3
commit ac9da14b3f

2
uc.c
View File

@ -953,7 +953,7 @@ uc_err uc_mem_unmap(struct uc_struct *uc, uint64_t address, size_t size)
// size must be multiple of uc->target_page_size
if ((size & uc->target_page_align) != 0)
return UC_ERR_MAP;
return UC_ERR_ARG;
if (uc->mem_redirect) {
address = uc->mem_redirect(address);