oleaut32: Extend value range before getting absolute value in VarBstrFromI4.

Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Daniel Lehman 2018-07-31 11:30:39 -07:00 committed by Alexandre Julliard
parent 7198499dd0
commit 1d2ac5d8b6
2 changed files with 2 additions and 2 deletions

View File

@ -4556,7 +4556,7 @@ static void test_VarBstrFromI4(void)
ok(hres == S_OK, "got hres 0x%08x\n", hres);
if (bstr)
{
todo_wine ok(memcmp(bstr, int_min, sizeof(int_min)) == 0, "string different\n");
ok(memcmp(bstr, int_min, sizeof(int_min)) == 0, "string different\n");
SysFreeString(bstr);
}

View File

@ -6453,7 +6453,7 @@ HRESULT WINAPI VarBstrFromI4(LONG lIn, LCID lcid, ULONG dwFlags, BSTR* pbstrOut)
if (lIn < 0)
{
ul64 = (ULONG)-lIn;
ul64 = -(LONG64)lIn;
dwFlags |= VAR_NEGATIVE;
}
return VARIANT_BstrFromUInt(ul64, lcid, dwFlags, pbstrOut);