Fix crash bugs

This commit is contained in:
Hamish Milne
2020-02-13 17:42:06 +08:00
committed by zhupengfei
parent 116d22d562
commit f2de70c3fb
8 changed files with 32 additions and 21 deletions
+3
View File
@@ -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};
}