Skip to content

Commit

Permalink
small patch_and_redirect improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Auto committed Sep 25, 2023
1 parent b4f9712 commit 3a5f7bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game_api/memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ size_t patch_and_redirect(size_t addr, size_t replace_size, const std::string_vi
std::memcpy(new_code, (void*)addr, data_size_to_move);
}

size_t return_addr = addr + jump_size;
size_t return_addr = addr + replace_size;
if (return_to_addr != 0)
{
return_addr = return_to_addr;
Expand Down

0 comments on commit 3a5f7bf

Please sign in to comment.