propsys: Fix negative numeric source handling in PropVariantToBoolean().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2017-09-24 12:00:08 +03:00 committed by Alexandre Julliard
parent 1c67258dbf
commit 3b18054f25
2 changed files with 1 additions and 4 deletions

View File

@ -282,7 +282,7 @@ HRESULT WINAPI PropVariantToBoolean(REFPROPVARIANT propvarIn, BOOL *ret)
break;
}
hr = PROPVAR_ConvertNumber(propvarIn, 64, FALSE, &res);
hr = PROPVAR_ConvertNumber(propvarIn, 64, TRUE, &res);
*ret = !!res;
return hr;
}

View File

@ -956,7 +956,6 @@ static void test_PropVariantToBoolean(void)
propvar.u.lVal = -67;
val = FALSE;
hr = PropVariantToBoolean(&propvar, &val);
todo_wine
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(val == TRUE, "Unexpected value %d\n", val);
@ -986,7 +985,6 @@ todo_wine
propvar.u.pwszVal = str_n7;
val = FALSE;
hr = PropVariantToBoolean(&propvar, &val);
todo_wine
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(val == TRUE, "Unexpected value %d\n", val);
@ -1092,7 +1090,6 @@ todo_wine
propvar.vt = VT_LPSTR;
propvar.u.pszVal = (char *)"-1";
hr = PropVariantToBoolean(&propvar, &val);
todo_wine
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(val == TRUE, "Unexpected value %d\n", val);
}