From a739e3bc8dcefb438ae4feab8bee1917443bebc4 Mon Sep 17 00:00:00 2001 From: /dev/urandom Date: Fri, 2 Jun 2017 21:34:14 +0200 Subject: [PATCH] [Hooking] Fix variable typos. --- src/Utils/Hooking.cpp | 4 ++-- src/Utils/Hooking.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Utils/Hooking.cpp b/src/Utils/Hooking.cpp index 37f6e6dd..3abd73d9 100644 --- a/src/Utils/Hooking.cpp +++ b/src/Utils/Hooking.cpp @@ -139,7 +139,7 @@ namespace Utils return this; } - Hook* Hook::install(bool unprotect, bool keepUnportected) + Hook* Hook::install(bool unprotect, bool keepUnprotected) { std::lock_guard _(this->stateMutex); @@ -159,7 +159,7 @@ namespace Utils *reinterpret_cast(code + 1) = reinterpret_cast(this->stub) - (reinterpret_cast(this->place) + 5); - if (unprotect && !keepUnportected) VirtualProtect(this->place, sizeof(this->buffer), this->protection, &this->protection); + if (unprotect && !keepUnprotected) VirtualProtect(this->place, sizeof(this->buffer), this->protection, &this->protection); FlushInstructionCache(GetCurrentProcess(), this->place, sizeof(this->buffer)); diff --git a/src/Utils/Hooking.hpp b/src/Utils/Hooking.hpp index 130cb9d0..d40e25f1 100644 --- a/src/Utils/Hooking.hpp +++ b/src/Utils/Hooking.hpp @@ -61,7 +61,7 @@ namespace Utils Hook* initialize(void* place, void* stub, bool useJump = true); Hook* initialize(DWORD place, void* stub, bool useJump = true); Hook* initialize(DWORD place, void(*stub)(), bool useJump = true); // For lambdas - Hook* install(bool unprotect = true, bool keepUnportected = false); + Hook* install(bool unprotect = true, bool keepUnprotected = false); Hook* uninstall(bool unprotect = true); void* getAddress();