Do an OSFatal if the getting the PA from EA fails

This commit is contained in:
Maschell 2021-09-23 23:05:15 +02:00
parent dd3709ad48
commit 551144ddbd
1 changed files with 4 additions and 0 deletions

View File

@ -249,6 +249,10 @@ void FunctionPatcherRestoreFunctions(function_replacement_data_t *replacements,
sourceAddrPhys = sourceAddr + 0x30800000 - 0x00800000;
}
if(sourceAddrPhys == 0){
OSFatal("Failed to get physical address");
}
KernelCopyData(targetAddrPhys, sourceAddrPhys, 4);
if (DEBUG_LOG_DYN) {
WHBLogPrintf("");