mirror of https://github.com/x64dbg/TitanEngine
Don't call DebugSetProcessKillOnExit if SafeAttach is enabled
This commit is contained in:
parent
8f83721fd3
commit
35fdd5684e
|
|
@ -553,14 +553,11 @@ __declspec(dllexport) bool TITCALL AttachDebugger(DWORD ProcessId, bool KillOnEx
|
|||
{
|
||||
if(engineEnableDebugPrivilege)
|
||||
EngineSetDebugPrivilege(GetCurrentProcess(), false);
|
||||
if(KillOnExit)
|
||||
{
|
||||
funcDebugSetProcessKillOnExit = GetProcAddress(GetModuleHandleA("kernel32.dll"), "DebugSetProcessKillOnExit");
|
||||
if(funcDebugSetProcessKillOnExit != NULL)
|
||||
{
|
||||
myDebugSetProcessKillOnExit = (fDebugSetProcessKillOnExit)(funcDebugSetProcessKillOnExit);
|
||||
myDebugSetProcessKillOnExit(KillOnExit);
|
||||
}
|
||||
myDebugSetProcessKillOnExit(KillOnExit && !engineSafeAttach ? true : false);
|
||||
}
|
||||
DebugDebuggingDLL = false;
|
||||
DebugAttachedToProcess = true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue