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

Alexandre Julliard julliard at winehq.org
Wed Aug 15 14:39:54 CDT 2018


Module: wine
Branch: master
Commit: 1d2ac5d8b6eb9bf6cf2128976c544b3d6594c0c4
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=1d2ac5d8b6eb9bf6cf2128976c544b3d6594c0c4

Author: Daniel Lehman <dlehman at esri.com>
Date:   Tue Jul 31 11:30:39 2018 -0700

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

Signed-off-by: Daniel Lehman <dlehman at esri.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/oleaut32/tests/vartype.c | 2 +-
 dlls/oleaut32/vartype.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c
index 8c454e2..7daf2f0 100644
--- a/dlls/oleaut32/tests/vartype.c
+++ b/dlls/oleaut32/tests/vartype.c
@@ -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);
   }
 
diff --git a/dlls/oleaut32/vartype.c b/dlls/oleaut32/vartype.c
index 37c4be5..232a58f 100644
--- a/dlls/oleaut32/vartype.c
+++ b/dlls/oleaut32/vartype.c
@@ -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);




More information about the wine-cvs mailing list