mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:26:10 +00:00
propsys: Cast to ULONGLONG instead of LONGLONG in test_intconversions test_intconversions to avoid shift overflow.
This commit is contained in:
parent
509d0f06ce
commit
519ad57cb5
1 changed files with 2 additions and 2 deletions
|
@ -765,11 +765,11 @@ static void test_intconversions(void)
|
||||||
PropVariantClear(&propvar);
|
PropVariantClear(&propvar);
|
||||||
|
|
||||||
propvar.vt = VT_I8;
|
propvar.vt = VT_I8;
|
||||||
propvar.u.hVal.QuadPart = (LONGLONG)1 << 63;
|
propvar.u.hVal.QuadPart = (ULONGLONG)1 << 63;
|
||||||
|
|
||||||
hr = PropVariantToInt64(&propvar, &llval);
|
hr = PropVariantToInt64(&propvar, &llval);
|
||||||
ok(hr == S_OK, "hr=%x\n", hr);
|
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);
|
hr = PropVariantToUInt64(&propvar, &ullval);
|
||||||
ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%x\n", hr);
|
ok(hr == HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW), "hr=%x\n", hr);
|
||||||
|
|
Loading…
Reference in a new issue