From 93cd6dbed585c6ce914ac78da897d1d3d6342f4f Mon Sep 17 00:00:00 2001 From: Pavol Marko Date: Sat, 28 Aug 2004 21:29:25 +0000 Subject: [PATCH] Fixed problem with pack not popped (=> hlsdk structures should be aligned correctly again) --- amxmodx/sdk/amxxmodule.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/amxmodx/sdk/amxxmodule.h b/amxmodx/sdk/amxxmodule.h index 7d8941e7..35534730 100755 --- a/amxmodx/sdk/amxxmodule.h +++ b/amxmodx/sdk/amxxmodule.h @@ -240,6 +240,14 @@ enum { AMX_ERR_DOMAIN, /* domain error, expression result does not fit in range */ }; +#if !defined AMX_NO_ALIGN + #if defined __linux__ + #pragma pack() /* reset default packing */ + #else + #pragma pack(pop) /* reset previous packing */ + #endif +#endif + // ***** declare functions ***** @@ -2155,4 +2163,5 @@ void Mem_Deallocator(const char *sourceFile, const unsigned int sourceLine, cons #define realloc(ptr,sz) Mem_Reallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_realloc,sz,ptr) #define free(ptr) Mem_Deallocator(__FILE__,__LINE__,__FUNCTION__,m_alloc_free,ptr) + #endif // #ifndef __AMXXMODULE_H__