Skip to content
This repository has been archived by the owner on Jun 1, 2022. It is now read-only.

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AmazingPP committed Feb 7, 2021
1 parent f463b47 commit 05ed83b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions subVersion/hack.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class hack : public trainer
std::string m_mpId;
std::deque<std::pair<unsigned int,int>> m_dStat;
ImpactExplosionEnum m_explosion;
std::mutex m_mutex;

HMODULE m_hModule;

Expand Down
1 change: 1 addition & 0 deletions subVersion/memManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ bool memManager::attach()
if(!dwProcId)
return 0;

auto a = PROCESS_ALL_ACCESS;
m_hProc = OpenProcess(PROCESS_VM_OPERATION | PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_QUERY_INFORMATION, 0, dwProcId);
if(m_hProc == nullptr)
return 0;
Expand Down
2 changes: 2 additions & 0 deletions subVersion/patternBatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ inline bool patternBatch::compareBytes(const unsigned char* bytes, const char* p
if (*pattern == ' ' || *pattern == '?')
continue;

auto a = *bytes;
auto b = getByte(pattern);
if (*bytes != getByte(pattern))
return false;

Expand Down
7 changes: 6 additions & 1 deletion subVersion/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,12 @@ class featBtn : public feat
{
m_Action = [=]()
{
std::thread(func, g_pHack, args...).detach();
std::thread t([=]()
{
std::lock_guard<std::mutex> lock(g_pHack->m_mutex);
(g_pHack->*func)(args...);
});
t.detach();
};
}
~featBtn() {};
Expand Down

0 comments on commit 05ed83b

Please sign in to comment.