From 8d13754a76791c36852cdc2a455cb4f6f6faa359 Mon Sep 17 00:00:00 2001 From: mudlord Date: Thu, 29 May 2008 04:05:38 +0000 Subject: [PATCH] Fixed pragmas git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@551 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/win32/protect.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/win32/protect.h b/src/win32/protect.h index 8aaafec9..bffe5f3d 100644 --- a/src/win32/protect.h +++ b/src/win32/protect.h @@ -10,15 +10,16 @@ extern "C" { int ExecutableValid(const char *executable_filename); char *unprotect_buffer(unsigned char *buffer, size_t buffer_len); +#pragma optimize("", off) #define SET_FN_PTR(func, num) \ - #pragma optimize("", off) \ static __inline void *get_##func(void) { \ int i, j = num / 4; \ long ptr = (long)func + num; \ for (i = 0; i < 2; i++) { ptr -= j; } \ return (void *)(ptr - (j * 2)); \ } \ - #pragma optimize("", on) + +#pragma optimize("", on) #define GET_FN_PTR(func) get_##func()