Fix test failure

This commit is contained in:
Choongwoo Han 2023-03-20 18:41:59 -07:00 committed by Choongwoo Han
parent 8f2841ecdb
commit 0a38a0bf17

4
uc.c
View File

@ -1524,7 +1524,7 @@ MemoryRegion *find_memory_region(struct uc_struct *uc, uint64_t address)
if (i < uc->mapped_block_count &&
address >= uc->mapped_blocks[i]->addr &&
address < uc->mapped_blocks[i]->end) {
address <= uc->mapped_blocks[i]->end - 1) {
return uc->mapped_blocks[i];
}
@ -1532,7 +1532,7 @@ MemoryRegion *find_memory_region(struct uc_struct *uc, uint64_t address)
if (i < uc->mapped_block_count &&
address >= uc->mapped_blocks[i]->addr &&
address < uc->mapped_blocks[i]->end) {
address <= uc->mapped_blocks[i]->end - 1) {
uc->mapped_block_cache_index = i;
return uc->mapped_blocks[i];
}