Commit 756f7817 authored by Alexandre Julliard's avatar Alexandre Julliard

oleaut32: Fix check for DECIMAL variant in VarNumFromParseNum.

Reported by Gerald Pfeifer. Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent b67dc2f4
......@@ -2161,7 +2161,7 @@ HRESULT WINAPI VarNumFromParseNum(NUMPARSE *pNumprs, BYTE *rgbDig,
multiplier10, divisor10);
if (dwVtBits & (INTEGER_VTBITS|VTBIT_DECIMAL) &&
(!fractionalDigits || !(dwVtBits & (REAL_VTBITS|VTBIT_CY|VTBIT_DECIMAL))))
(!fractionalDigits || !(dwVtBits & (REAL_VTBITS|VTBIT_DECIMAL))))
{
/* We have one or more integer output choices, and either:
* 1) An integer input value, or
......@@ -2275,7 +2275,7 @@ HRESULT WINAPI VarNumFromParseNum(NUMPARSE *pNumprs, BYTE *rgbDig,
V_I8(pVarDst) = -ul64;
return S_OK;
}
else if ((dwVtBits & REAL_VTBITS) == VTBIT_DECIMAL)
else if ((dwVtBits & (REAL_VTBITS|VTBIT_DECIMAL)) == VTBIT_DECIMAL)
{
/* Decimal is only output choice left - fast path */
V_VT(pVarDst) = VT_DECIMAL;
......@@ -2337,7 +2337,7 @@ HRESULT WINAPI VarNumFromParseNum(NUMPARSE *pNumprs, BYTE *rgbDig,
V_UI8(pVarDst) = ul64;
return S_OK;
}
else if ((dwVtBits & REAL_VTBITS) == VTBIT_DECIMAL)
else if ((dwVtBits & (REAL_VTBITS|VTBIT_DECIMAL)) == VTBIT_DECIMAL)
{
/* Decimal is only output choice left - fast path */
V_VT(pVarDst) = VT_DECIMAL;
......
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