The function type is now stored as a enum

This commit is contained in:
Maschell 2020-06-13 13:58:34 +02:00
parent 6c18efef54
commit d43d097fd9

View File

@ -53,10 +53,10 @@ void FunctionPatcherPatchFunction(function_replacement_data_t *replacements, uin
continue; continue;
} }
} else { } else {
if (function_data->functionType == STATIC_FUNCTION && function_data->alreadyPatched == 1) { if (function_data->functionType == FUNCTION_PATCHER_STATIC_FUNCTION && function_data->alreadyPatched == 1) {
if (isDynamicFunction((uint32_t) OSEffectiveToPhysical(function_data->realAddr))) { if (isDynamicFunction((uint32_t) OSEffectiveToPhysical(function_data->realAddr))) {
DEBUG_FUNCTION_LINE("INFO: The function %s is a dynamic function.", function_data->function_name); DEBUG_FUNCTION_LINE("INFO: The function %s is a dynamic function.", function_data->function_name);
function_data->functionType = DYNAMIC_FUNCTION; function_data->functionType = FUNCTION_PATCHER_DYNAMIC_FUNCTION;
} else { } else {
WHBLogWritef("Skipping %s, its already patched", function_data->function_name); WHBLogWritef("Skipping %s, its already patched", function_data->function_name);
continue; continue;