Commit bda6decd authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

oleaut32: Fully initialize VarMod() return value for Empty % x case.

parent 7391352a
...@@ -3513,7 +3513,8 @@ static void test_Mod( int line, VARIANT *left, VARIANT *right, VARIANT *expected ...@@ -3513,7 +3513,8 @@ static void test_Mod( int line, VARIANT *left, VARIANT *right, VARIANT *expected
VARIANT result; VARIANT result;
HRESULT hres; HRESULT hres;
memset( &result, 0, sizeof(result) ); V_VT(&result) = 15;
V_I4(&result) = 0x12345;
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)
......
...@@ -5499,6 +5499,7 @@ HRESULT WINAPI VarMod(LPVARIANT left, LPVARIANT right, LPVARIANT result) ...@@ -5499,6 +5499,7 @@ HRESULT WINAPI VarMod(LPVARIANT left, LPVARIANT right, LPVARIANT result)
if(V_VT(left) == VT_EMPTY) if(V_VT(left) == VT_EMPTY)
{ {
V_VT(result) = VT_I4; V_VT(result) = VT_I4;
V_I4(result) = 0;
rc = S_OK; rc = S_OK;
goto end; goto end;
} }
......
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