s/__amd64/_M_AMD64/

Newer MSVC seems to use a different preprocessor symbol to denote
64-bit builds.
This commit is contained in:
Decaf Code
2019-05-02 19:37:11 -04:00
parent 6fad9ad7f7
commit 8d2a67f64d
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -7,7 +7,7 @@
static const PEB *peb_get(void)
{
#ifdef __amd64
#ifdef _M_AMD64
return (const PEB *) __readgsqword(0x60);
#else
return (const PEB *) __readfsdword(0x30);
+3 -3
View File
@@ -14,7 +14,7 @@ static bool thread_match_startup(
void *ntstart,
void *exe_entry)
{
#ifdef __amd64
#ifdef _M_AMD64
return ctx->Rip == (DWORD64) ntstart &&
ctx->Rcx == (DWORD64) exe_entry;
#else
@@ -28,7 +28,7 @@ static void thread_patch_startup(
process_entry_t *orig_entry,
CONTEXT *ctx)
{
#ifdef __amd64
#ifdef _M_AMD64
*orig_entry = (void *) ctx->Rcx;
ctx->Rcx = (DWORD64) new_entry;
#else
@@ -94,7 +94,7 @@ static HRESULT process_hijack_try_thread(
}
memset(&ctx, 0, sizeof(ctx));
#ifdef __amd64
#ifdef _M_AMD64
ctx.ContextFlags = CONTEXT_AMD64 | CONTEXT_FULL;
#else
ctx.ContextFlags = CONTEXT_i386 | CONTEXT_FULL;