Skip to content

Commit

Permalink
It's actually a get not a set, naming stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
maximegmd committed Dec 16, 2020
1 parent 0ba70e8 commit ebd3262
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/async_compute_patch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct GameProperty
static_assert(offsetof(GameProperty, kind) == 0x28);
static_assert(offsetof(GameProperty, pBoolean) == 0x30);

bool HookGamePropertySetBoolean(GameProperty* apThis, uint8_t* apVariable, uint8_t aKind)
bool HookGamePropertyGetBoolean(GameProperty* apThis, uint8_t* apVariable, uint8_t aKind)
{
auto* pLocation = apThis->pBoolean;
if (!pLocation)
Expand Down Expand Up @@ -52,7 +52,7 @@ void AsyncComputePatch(Image* apImage)
DWORD oldProtect = 0;
VirtualProtect(pLocation, 32, PAGE_EXECUTE_WRITECOPY, &oldProtect);

void* pAddress = &HookGamePropertySetBoolean;
void* pAddress = &HookGamePropertyGetBoolean;

// mov rax, HookSpin
pLocation[0] = 0x48;
Expand Down

0 comments on commit ebd3262

Please sign in to comment.