ole32/tests: Fix crashes in PropVariantClear tests under win2000 and XP.

This commit is contained in:
Dmitry Timoshkov 2014-04-17 15:56:40 +09:00 committed by Alexandre Julliard
parent f719ef3858
commit ccefbee73b

View file

@ -196,7 +196,10 @@ static void test_validtypes(void)
VARTYPE vt;
memset(&propvar, 0x55, sizeof(propvar));
U(propvar).pszVal = NULL;
if (i == VT_RECORD || i == VT_BLOB || i == VT_BLOB_OBJECT)
U(propvar).uhVal.QuadPart = 0;
else
U(propvar).pszVal = NULL;
vt = propvar.vt = i;
hr = PropVariantClear(&propvar);
expect(hr, vt);
@ -214,7 +217,8 @@ static void test_validtypes(void)
i, U(propvar).uhVal.u.LowPart, U(propvar).uhVal.u.HighPart);
memset(&propvar, 0x55, sizeof(propvar));
U(propvar).pszVal = NULL;
U(propvar).caub.cElems = 0;
U(propvar).caub.pElems = NULL;
vt = propvar.vt = i | VT_VECTOR;
hr = PropVariantClear(&propvar);
expect(hr, vt);