diff options
Diffstat (limited to 'src/l4d1democompat.c')
-rw-r--r-- | src/l4d1democompat.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/l4d1democompat.c b/src/l4d1democompat.c index 105b812..1d27984 100644 --- a/src/l4d1democompat.c +++ b/src/l4d1democompat.c @@ -123,12 +123,12 @@ __attribute__((naked)) #endif static int hook_midpoint() { __asm__ volatile ( - "pushl %%eax\n" - "movl %1, %%eax\n" - "movl (%%eax), %%eax\n" // dereference this_protocol - "movl %%eax, %0\n" // store in demoversion - "popl %%eax\n" - "jmpl *%2\n" + "push eax\n" + "mov eax, %1\n" + "mov eax, [eax]\n" // dereference this_protocol + "mov %0, eax\n" // store in demoversion + "pop eax\n" + "jmp dword ptr %2\n" : "=m" (demoversion) : "m" (this_protocol), "m" (ReadDemoHeader_midpoint) ); |