better error reporting
This commit is contained in:
parent
383fe554c9
commit
0b8e2a217b
@ -264,11 +264,11 @@ bool TextHook::UnsafeInsertHookCode()
|
||||
}
|
||||
|
||||
BYTE* original;
|
||||
if (int err = MH_CreateHook((void*)hp.address, (void*)trampoline, (void**)&original))
|
||||
if (MH_STATUS err = MH_CreateHook((void*)hp.address, (void*)trampoline, (void**)&original))
|
||||
if (err == MH_ERROR_ALREADY_CREATED) RemoveHook(hp.address);
|
||||
else
|
||||
{
|
||||
ConsoleOutput(("NextHooker: UnsafeInsertHookCode: FAILED: error " + std::to_string(err)).c_str());
|
||||
ConsoleOutput(("NextHooker: UnsafeInsertHookCode: FAILED: error " + std::string(MH_StatusToString(err))).c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user