Commit b6db22da authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

oleaut32: Fixed vartest.c tests on Windows 8.1.

parent 20e47051
......@@ -542,14 +542,11 @@ static void _test_bstr_var(unsigned line, const VARIANT *v, const char *str)
static void test_VariantInit(void)
{
VARIANTARG v1, v2;
VARIANT v;
/* Test that VariantInit() only sets the type */
memset(&v1, -1, sizeof(v1));
v2 = v1;
V_VT(&v2) = VT_EMPTY;
VariantInit(&v1);
ok(!memcmp(&v1, &v2, sizeof(v1)), "VariantInit() set extra fields\n");
memset(&v, -1, sizeof(v));
VariantInit(&v);
ok(V_VT(&v) == VT_EMPTY, "VariantInit() returned vt %d\n", V_VT(&v));
}
/* All possible combinations of extra V_VT() flags */
......
......@@ -575,7 +575,8 @@ void WINAPI VariantInit(VARIANTARG* pVarg)
{
TRACE("(%p)\n", pVarg);
V_VT(pVarg) = VT_EMPTY; /* Native doesn't set any other fields */
/* Win8.1 zeroes whole struct. Previous implementations don't set any other fields. */
V_VT(pVarg) = VT_EMPTY;
}
HRESULT VARIANT_ClearInd(VARIANTARG *pVarg)
......
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