mirror of
https://github.com/wiiu-env/FunctionPatcherModule.git
synced 2025-01-07 23:50:44 +01:00
Check if we exceed the space we have available
This commit is contained in:
parent
d43d097fd9
commit
dcff18577f
@ -165,6 +165,10 @@ void FunctionPatcherPatchFunction(function_replacement_data_t *replacements, uin
|
||||
replace_instr = 0x48000002 | (repl_addr_test & 0x03FFFFFC);
|
||||
}
|
||||
|
||||
if(space > &function_data->replace_data[FUNCTION_PATCHER_METHOD_STORE_SIZE]){
|
||||
OSFatal("The replacement data is too long.");
|
||||
}
|
||||
|
||||
DCFlushRange((void *) function_data->replace_data, FUNCTION_PATCHER_METHOD_STORE_SIZE * 4);
|
||||
ICInvalidateRange((void *) function_data->replace_data, FUNCTION_PATCHER_METHOD_STORE_SIZE * 4);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user