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);