From f030d7527ab8e646e57c59f02374c2cdc130b24a Mon Sep 17 00:00:00 2001 From: Ulrich Weigand Date: Sat, 8 Jan 2000 22:19:46 +0000 Subject: [PATCH] Fixed alignment problem with VERSION_INFO members. --- dlls/version/info.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dlls/version/info.c b/dlls/version/info.c index a255c8d5832..5795eba059f 100644 --- a/dlls/version/info.c +++ b/dlls/version/info.c @@ -172,12 +172,13 @@ typedef struct #define VersionInfoIs16( ver ) \ ( ((VS_VERSION_INFO_STRUCT16 *)ver)->szKey[0] >= ' ' ) -#define DWORD_ALIGN( ptr ) ((LPBYTE)( (((DWORD)(ptr)) + 3) & ~3 )) +#define DWORD_ALIGN( base, ptr ) \ + ( (LPBYTE)(base) + ((((LPBYTE)(ptr) - (LPBYTE)(base)) + 3) & ~3) ) #define VersionInfo16_Value( ver ) \ - DWORD_ALIGN( (ver)->szKey + lstrlenA((ver)->szKey) + 1 ) + DWORD_ALIGN( (ver), (ver)->szKey + lstrlenA((ver)->szKey) + 1 ) #define VersionInfo32_Value( ver ) \ - DWORD_ALIGN( (ver)->szKey + lstrlenW((ver)->szKey) + 1 ) + DWORD_ALIGN( (ver), (ver)->szKey + lstrlenW((ver)->szKey) + 1 ) #define VersionInfo16_Children( ver ) \ (VS_VERSION_INFO_STRUCT16 *)( VersionInfo16_Value( ver ) + \