remove unused state from CDetourDis

This commit is contained in:
Lysann Tranvouez 2025-10-01 00:21:04 +02:00
parent 4c22783a54
commit 21c874186d
4 changed files with 54 additions and 91 deletions

View file

@ -766,10 +766,10 @@ mach_error_t detour_attach_ex(detour_func_t* inout_pointer, detour_func_t detour
while (offset_target < DETOUR_SIZE_OF_JMP) {
const uint8_t* curr_op = src;
int32_t extra_len = 0;
uint32_t extra_len = 0;
DETOUR_TRACE((" copy instruction src=%p, dest=%p\n", src, trampoline_code));
src = (uint8_t*)internal_detour_copy_instruction(trampoline_code, src, nullptr, &extra_len);
src = internal_detour_copy_instruction(trampoline_code, src, &extra_len);
DETOUR_TRACE((" after: src=%p (copied %d bytes)\n", src, (int)(src - curr_op)));
trampoline_code += (src - curr_op) + extra_len;
offset_target = (int32_t)(src - target);