Commit 5e9663c0 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

oleaut32: Always reset return type for VarMod().

parent bda6decd
...@@ -3518,8 +3518,15 @@ static void test_Mod( int line, VARIANT *left, VARIANT *right, VARIANT *expected ...@@ -3518,8 +3518,15 @@ static void test_Mod( int line, VARIANT *left, VARIANT *right, VARIANT *expected
hres = pVarMod( left, right, &result ); hres = pVarMod( left, right, &result );
ok_(__FILE__,line)( hres == expres, "wrong result %lx/%lx\n", hres, expres ); ok_(__FILE__,line)( hres == expres, "wrong result %lx/%lx\n", hres, expres );
if (hres == S_OK) if (hres == S_OK)
{
ok_(__FILE__,line)( is_expected_variant( &result, expected ), ok_(__FILE__,line)( is_expected_variant( &result, expected ),
"got %s expected %s\n", variantstr(&result), variantstr(expected) ); "got %s expected %s\n", variantstr(&result), variantstr(expected) );
}
else
{
ok_(__FILE__,line)( V_VT(&result) == VT_EMPTY, "Unexpected type %d.\n", V_VT(&result) );
ok_(__FILE__,line)( V_I4(&result) == 0x12345, "Unexpected value %ld.\n", V_I4(&result) );
}
} }
#define VARMOD(vt1,vt2,val1,val2,rvt,rval) \ #define VARMOD(vt1,vt2,val1,val2,rvt,rval) \
......
...@@ -5410,6 +5410,7 @@ HRESULT WINAPI VarMod(LPVARIANT left, LPVARIANT right, LPVARIANT result) ...@@ -5410,6 +5410,7 @@ HRESULT WINAPI VarMod(LPVARIANT left, LPVARIANT right, LPVARIANT result)
VariantInit(&tempRight); VariantInit(&tempRight);
VariantInit(&lv); VariantInit(&lv);
VariantInit(&rv); VariantInit(&rv);
V_VT(result) = VT_EMPTY;
TRACE("(%s,%s,%p)\n", debugstr_variant(left), debugstr_variant(right), result); TRACE("(%s,%s,%p)\n", debugstr_variant(left), debugstr_variant(right), result);
......
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