Skip to content

Commit dff7343

Browse files
authored
Trivial fixes for commit 309926a (microsoft#323)
1 parent 572f1f0 commit dff7343

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/detours.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,9 @@ inline PBYTE detour_skip_jmp(PBYTE pbCode, PVOID *ppGlobals)
209209
// enough to hold the detour code bytes.
210210
if (pbCode[0] == 0xff &&
211211
pbCode[1] == 0x25 &&
212-
*(UNALIGNED INT32 *)&pbCode[2] == (UNALIGNED INT32)(pbCode + 0x1000)) { // jmp [rip+PAGE_SIZE-6]
212+
*(UNALIGNED INT32 *)&pbCode[2] == (UNALIGNED INT32)(pbCode + 0x1000)) { // jmp [eip+PAGE_SIZE-6]
213213

214-
DETOUR_TRACE(("%p->%p: OS patch encountered, reset back to long jump 5 bytes prior to target function. \n", pbCode, pbCodeOriginal));
214+
DETOUR_TRACE(("%p->%p: OS patch encountered, reset back to long jump 5 bytes prior to target function.\n", pbCode, pbCodeOriginal));
215215
pbCode = pbCodeOriginal;
216216
}
217217

@@ -443,7 +443,7 @@ inline PBYTE detour_skip_jmp(PBYTE pbCode, PVOID *ppGlobals)
443443
pbCode[1] == 0x25 &&
444444
*(UNALIGNED INT32 *)&pbCode[2] == 0xFFA) { // jmp [rip+PAGE_SIZE-6]
445445

446-
DETOUR_TRACE(("%p->%p: OS patch encountered, reset back to long jump 5 bytes prior to target function. \n", pbCode, pbCodeOriginal));
446+
DETOUR_TRACE(("%p->%p: OS patch encountered, reset back to long jump 5 bytes prior to target function.\n", pbCode, pbCodeOriginal));
447447
pbCode = pbCodeOriginal;
448448
}
449449
}

0 commit comments

Comments
 (0)