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:
parent
1c67258dbf
commit
3b18054f25
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue