Skip to content

Commit

Permalink
oleaut32: Extend value range before getting absolute value in VarBstr…
Browse files Browse the repository at this point in the history
…FromI4.

Signed-off-by: Daniel Lehman <[email protected]>
Signed-off-by: Alexandre Julliard <[email protected]>
  • Loading branch information
dlehman-work authored and julliard committed Aug 15, 2018
1 parent 7198499 commit 1d2ac5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dlls/oleaut32/tests/vartype.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion dlls/oleaut32/vartype.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1d2ac5d

Please sign in to comment.