From 7353a95a7e2f6f7f06217971cd43bd49646ad280 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Sat, 11 Aug 2018 03:05:31 -0400 Subject: [PATCH] fixes for 64 bit --- GUI/misc.cpp | 2 +- host/host.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GUI/misc.cpp b/GUI/misc.cpp index 6d5093a..3144de6 100644 --- a/GUI/misc.cpp +++ b/GUI/misc.cpp @@ -66,7 +66,7 @@ HookParam ParseRCode(QString RCode) RCode.remove(0, 1); QRegExp address("[\\dA-F]+$"); if (address.indexIn(RCode) == -1) return {}; - hp.address = address.cap(0).toInt(nullptr, 16); + hp.address = address.cap(0).toULongLong(nullptr, 16); return hp; } diff --git a/host/host.cc b/host/host.cc index ba38953..368b2c4 100644 --- a/host/host.cc +++ b/host/host.cc @@ -157,7 +157,7 @@ namespace Host MutexLocker locker(pr.hookman_mutex); const Hook* hooks = (const Hook*)pr.hookman_map; for (int i = 0; i < MAX_HOOK; ++i) - if (hooks[i].Address() == addr) + if ((DWORD)hooks[i].Address() == addr) ret = hooks[i].hp; return ret; } @@ -172,7 +172,7 @@ namespace Host MutexLocker locker(pr.hookman_mutex); const Hook* hooks = (const Hook*)pr.hookman_map; for (int i = 0; i < MAX_HOOK; ++i) - if (hooks[i].Address() == addr) + if ((DWORD)hooks[i].Address() == addr) { buffer.resize(hooks[i].NameLength()); ReadProcessMemory(pr.process_handle, hooks[i].Name(), &buffer[0], hooks[i].NameLength(), nullptr);