Module: wine Branch: master Commit: 756f78178666901f34613c4980b7714b83e97d77 URL: http://source.winehq.org/git/wine.git/?a=commit;h=756f78178666901f34613c4980...
Author: Alexandre Julliard julliard@winehq.org Date: Fri Dec 8 15:23:55 2017 +0100
oleaut32: Fix check for DECIMAL variant in VarNumFromParseNum.
Reported by Gerald Pfeifer.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/oleaut32/variant.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c index a1feb27..b9cf4b0 100644 --- a/dlls/oleaut32/variant.c +++ b/dlls/oleaut32/variant.c @@ -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;