Fix crash bugs
This commit is contained in:
parent
116d22d562
commit
f2de70c3fb
8 changed files with 32 additions and 21 deletions
|
@ -452,6 +452,9 @@ MemoryRef MemorySystem::GetPhysicalRef(PAddr address) {
|
|||
default:
|
||||
UNREACHABLE();
|
||||
}
|
||||
if (offset_into_region >= target_mem->GetSize()) {
|
||||
return {nullptr};
|
||||
}
|
||||
|
||||
return {target_mem, offset_into_region};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue