From: André Hentschel Subject: propsys: Don't shift negative value Message-Id: <544ED049.1070507@dawncrow.de> Date: Tue, 28 Oct 2014 00:07:53 +0100 https://bugs.winehq.org/show_bug.cgi?id=37117 --- dlls/propsys/propvar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/propsys/propvar.c b/dlls/propsys/propvar.c index fd22c9d..5fbb623 100644 --- a/dlls/propsys/propvar.c +++ b/dlls/propsys/propvar.c @@ -124,7 +124,7 @@ static HRESULT PROPVAR_ConvertNumber(REFPROPVARIANT pv, int dest_bits, if (dest_signed) { if (*res >= ((LONGLONG)1 << (dest_bits-1)) || - *res < ((LONGLONG)-1 << (dest_bits-1))) + *res < -1 * (((LONGLONG)1 << (dest_bits-1)) - 1)) return HRESULT_FROM_WIN32(ERROR_ARITHMETIC_OVERFLOW); } else