From 7ab8d4733fe835e012eb5c08989034791219fd10 Mon Sep 17 00:00:00 2001 From: hugy <504650082@qq.com> Date: Sun, 2 Jul 2023 17:13:20 +0800 Subject: [PATCH] fix: hook flag --- src/hooks.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hooks.cc b/src/hooks.cc index 176ad1c..84d56cc 100644 --- a/src/hooks.cc +++ b/src/hooks.cc @@ -168,7 +168,9 @@ int HookSyncMsg(std::string client_ip, int port, std::string url, UINT64 do_add_msg_addr = base + offset::kDoAddMsg; DetourAttach(&(PVOID&)R_DoAddMsg, &HandleSyncMsg); LONG ret = DetourTransactionCommit(); - + if(ret == NO_ERROR){ + kMsgHookFlag = true; + } return ret; }