Commit 873e41ba authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

oleaut32: Remove overflow check for VT_R4 and VT_R8 in VarAbs.

(cherry picked from commit 23f0df42)
parent 18448aa2
......@@ -3121,6 +3121,8 @@ static void test_VarAbs(void)
VARABS(R4,-1,R4,1);
VARABS(R8,1,R8,1);
VARABS(R8,-1,R8,1);
VARABS(R4,1.40129846432481707e-45,R4,1.40129846432481707e-45);
VARABS(R8,4.94065645841246544e-324,R8,4.94065645841246544e-324);
VARABS(DATE,1,DATE,1);
VARABS(DATE,-1,DATE,1);
V_VT(&v) = VT_CY;
......
......@@ -4369,7 +4369,9 @@ HRESULT WINAPI VarAbs(LPVARIANT pVarIn, LPVARIANT pVarOut)
case VT_INT:
ABS_CASE(I4,I4_MIN);
ABS_CASE(I8,I8_MIN);
ABS_CASE(R4,R4_MIN);
case VT_R4:
if (V_R4(pVarOut) < 0.0) V_R4(pVarOut) = -V_R4(pVarOut);
break;
case VT_BSTR:
hRet = VarR8FromStr(V_BSTR(pVarIn), LOCALE_USER_DEFAULT, 0, &V_R8(&varIn));
if (FAILED(hRet))
......@@ -4378,7 +4380,9 @@ HRESULT WINAPI VarAbs(LPVARIANT pVarIn, LPVARIANT pVarOut)
pVarIn = &varIn;
/* Fall through ... */
case VT_DATE:
ABS_CASE(R8,R8_MIN);
case VT_R8:
if (V_R8(pVarOut) < 0.0) V_R8(pVarOut) = -V_R8(pVarOut);
break;
case VT_CY:
hRet = VarCyAbs(V_CY(pVarIn), & V_CY(pVarOut));
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment