Commit 6d1ba98f authored by Alexandre Julliard's avatar Alexandre Julliard

ddraw/tests: Fix a test that fails on Win2k.

parent 1e2b0ad4
......@@ -665,9 +665,10 @@ static void testddraw7(void)
{
dddi2Bytes = FIELD_OFFSET(DDDEVICEIDENTIFIER2, dwWHQLLevel) + sizeof(DWORD);
pdddi2 = HeapAlloc( GetProcessHeap(), 0, dddi2Bytes + sizeof(DWORD) );
pdddi2 = HeapAlloc( GetProcessHeap(), 0, dddi2Bytes + 2*sizeof(DWORD) );
pend = (DWORD *)((char *)pdddi2 + dddi2Bytes);
*pend = 0xdeadbeef;
pend[0] = 0xdeadbeef;
pend[1] = 0xdeadbeef;
hr = IDirectDraw7_GetDeviceIdentifier(dd7, pdddi2, 0);
ok(hr==DD_OK, "get device identifier failed with %08x\n", hr);
......@@ -678,7 +679,9 @@ static void testddraw7(void)
ok(pdddi2->szDriver[MAX_DDDEVICEID_STRING - 1]==0, "szDriver not cleared\n");
ok(pdddi2->szDescription[MAX_DDDEVICEID_STRING - 1]==0, "szDescription not cleared\n");
/* verify that 8 byte structure size alignment will not overwrite memory */
ok(*pend==0xdeadbeef, "memory beyond DDDEVICEIDENTIFIER2 overwritten\n");
ok(pend[0]==0xdeadbeef || broken(pend[0] != 0xdeadbeef), /* win2k */
"memory beyond DDDEVICEIDENTIFIER2 overwritten\n");
ok(pend[1]==0xdeadbeef, "memory beyond DDDEVICEIDENTIFIER2 overwritten\n");
}
IDirectDraw_Release(dd7);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment