Gerald Pfeifer : propsys: Cast to ULONGLONG instead of LONGLONG in test_intconversions test_intconversions to avoid shift overflow.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Sep 7 09:20:13 CDT 2015


Module: wine
Branch: master
Commit: 519ad57cb5ebdb142bd755f924e8487985801315
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=519ad57cb5ebdb142bd755f924e8487985801315

Author: Gerald Pfeifer <gerald at pfeifer.com>
Date:   Fri Sep  4 21:47:36 2015 +0200

propsys: Cast to ULONGLONG instead of LONGLONG in test_intconversions test_intconversions to avoid shift overflow.

---

 dlls/propsys/tests/propsys.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/propsys/tests/propsys.c b/dlls/propsys/tests/propsys.c
index 99d1c460..0dd052c 100644
--- a/dlls/propsys/tests/propsys.c
+++ b/dlls/propsys/tests/propsys.c
@@ -765,11 +765,11 @@ static void test_intconversions(void)
     PropVariantClear(&propvar);
 
     propvar.vt = VT_I8;
-    propvar.u.hVal.QuadPart = (LONGLONG)1 << 63;
+    propvar.u.hVal.QuadPart = (ULONGLONG)1 << 63;
 
     hr = PropVariantToInt64(&propvar, &llval);
     ok(hr == S_OK, "hr=%x\n", hr);
-    ok(llval == (LONGLONG)1 << 63, "got wrong value %s\n", debugstr_longlong(llval));
+    ok(llval == (ULONGLONG)1 << 63, "got wrong value %s\n", debugstr_longlong(llval));
 
     hr = PropVariantToUInt64(&propvar, &ullval);
     ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%x\n", hr);




More information about the wine-cvs mailing list