[PATCH 2/3] oleaut32: BSTRs should have 8 byte alignment on 64 bits.

Jacek Caban jacek at codeweavers.com
Thu Jan 21 06:32:03 CST 2016


On 01/21/16 11:29, Huw Davies wrote:
> Signed-off-by: Huw Davies <huw at codeweavers.com>
> ---
>  dlls/oleaut32/oleaut.c        | 3 +++
>  dlls/oleaut32/tests/vartype.c | 3 +++
>  2 files changed, 6 insertions(+)
>
> diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c
> index 8a22c2e..07db9ff 100644
> --- a/dlls/oleaut32/oleaut.c
> +++ b/dlls/oleaut32/oleaut.c
> @@ -84,6 +84,9 @@ static CRITICAL_SECTION_DEBUG cs_bstr_cache_dbg =
>  static CRITICAL_SECTION cs_bstr_cache = { &cs_bstr_cache_dbg, -1, 0, 0, 0, 0 };
>  
>  typedef struct {
> +#ifdef _WIN64
> +    DWORD pad;
> +#endif
>      DWORD size;
>      union {
>          char ptr[1];

How about changing size type to SIZE_T instead? This should have the
same effect.

Thanks,
Jacek



More information about the wine-devel mailing list