From: Kevin Puetz PuetzKevinA@JohnDeere.com
VariantCopyInd allows pvargDest == pvargSrc in order to dereference in place To avoid confusing the source values and a partially-written destination, wine's implementation makes a shallow copy and uses that as pSrc.
However, the call to VARIANT_CopyIRecordInfo did not use this, leading to it copying from the zeroed-out memory it just allocated. --- dlls/oleaut32/variant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c index 885082cc659..ec0c9544a61 100644 --- a/dlls/oleaut32/variant.c +++ b/dlls/oleaut32/variant.c @@ -879,7 +879,7 @@ HRESULT WINAPI VariantCopyInd(VARIANT* pvargDest, const VARIANTARG* pvargSrc) } else if (V_VT(pSrc) == (VT_RECORD|VT_BYREF)) { - hres = VARIANT_CopyIRecordInfo(pvargDest, pvargSrc); + hres = VARIANT_CopyIRecordInfo(pvargDest, pSrc); } else if (V_VT(pSrc) == (VT_DISPATCH|VT_BYREF) || V_VT(pSrc) == (VT_UNKNOWN|VT_BYREF))