oleaut32: BSTRs should have 8 byte alignment on 64 bits.
Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
13bc86c034
commit
36f454cda0
|
@ -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];
|
||||
|
|
|
@ -5398,9 +5398,12 @@ static void test_SysAllocString(void)
|
|||
if (str)
|
||||
{
|
||||
LPINTERNAL_BSTR bstr = Get(str);
|
||||
DWORD_PTR p = (DWORD_PTR)str;
|
||||
int align = sizeof(void *);
|
||||
|
||||
ok (bstr->dwLen == 8, "Expected 8, got %d\n", bstr->dwLen);
|
||||
ok (!lstrcmpW(bstr->szString, szTest), "String different\n");
|
||||
ok ((p & ~(align-1)) == p, "Not aligned to %d\n", align);
|
||||
SysFreeString(str);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue