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