fixes for 64 bit

This commit is contained in:
Akash Mozumdar 2018-08-11 03:05:31 -04:00
parent e06b8f27c8
commit 7353a95a7e
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

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