Jacek Caban : oleaut32: Fixed vartest.c tests on Windows 8.1.
Alexandre Julliard
julliard at winehq.org
Thu Mar 20 16:22:51 CDT 2014
Module: wine
Branch: master
Commit: b6db22da3bfbe4ab93c953406e76c4674af7051c
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b6db22da3bfbe4ab93c953406e76c4674af7051c
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Mar 20 12:28:12 2014 +0100
oleaut32: Fixed vartest.c tests on Windows 8.1.
---
dlls/oleaut32/tests/vartest.c | 11 ++++-------
dlls/oleaut32/variant.c | 3 ++-
2 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c
index 2f82d9b..d28b5c1 100644
--- a/dlls/oleaut32/tests/vartest.c
+++ b/dlls/oleaut32/tests/vartest.c
@@ -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 */
diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c
index 92cf01b..053903e 100644
--- a/dlls/oleaut32/variant.c
+++ b/dlls/oleaut32/variant.c
@@ -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)
More information about the wine-cvs
mailing list