mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-24 08:58:18 +00:00
return NULL in memory_mapping() if no memory is mapped. this fixes test_bad_unmap in test_x86.c
This commit is contained in:
parent
441d15e314
commit
26ee533303
1 changed files with 3 additions and 0 deletions
3
uc.c
3
uc.c
|
@ -809,6 +809,9 @@ MemoryRegion *memory_mapping(struct uc_struct* uc, uint64_t address)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
|
if (uc->mapped_block_count == 0)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
// try with the cache index first
|
// try with the cache index first
|
||||||
i = uc->mapped_block_cache_index;
|
i = uc->mapped_block_cache_index;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue