1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-29 23:32:23 +00:00

dmnt: set the debug process handle slightly more carefully

This commit is contained in:
Michael Scire 2021-02-20 17:37:59 -08:00
parent 1545fa9d44
commit 95a6b0828f

View file

@ -834,7 +834,11 @@ namespace ams::dmnt::cheat::impl {
} }
/* Open a debug handle. */ /* Open a debug handle. */
R_ABORT_UNLESS_IF_NEW_PROCESS(svcDebugActiveProcess(&this->cheat_process_debug_handle, static_cast<u64>(this->cheat_process_metadata.process_id))); svc::Handle debug_handle = svc::InvalidHandle;
R_ABORT_UNLESS_IF_NEW_PROCESS(svc::DebugActiveProcess(std::addressof(debug_handle), this->cheat_process_metadata.process_id.value));
/* Set our debug handle. */
this->cheat_process_debug_handle = debug_handle;
/* Cancel process guard. */ /* Cancel process guard. */
proc_guard.Cancel(); proc_guard.Cancel();