Signed-off-by: Francois Gouget fgouget@codeweavers.com --- dlls/oleaut32/tests/vartest.c | 9 +++------ dlls/oleaut32/variant.c | 3 +++ 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c index 89859988f1f..ecc8e8b0f11 100644 --- a/dlls/oleaut32/tests/vartest.c +++ b/dlls/oleaut32/tests/vartest.c @@ -2313,17 +2313,14 @@ static void test_VarParseNumFromStrMisc(void) SetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONDECIMALSEP, L"~");
hres = wconvert_str(L",1", ARRAY_SIZE(rgb), NUMPRS_THOUSANDS|NUMPRS_DECIMAL, &np, rgb, LOCALE_USER_DEFAULT, 0); - todo_wine EXPECT(1,NUMPRS_THOUSANDS|NUMPRS_DECIMAL,NUMPRS_DECIMAL,2,0,-1); - todo_wine EXPECTRGB(0,1); - EXPECTRGB(1,FAILDIG); + EXPECT(1,NUMPRS_THOUSANDS|NUMPRS_DECIMAL,NUMPRS_DECIMAL,2,0,-1); + EXPECT2(1,FAILDIG);
hres = wconvert_str(L"1,000", ARRAY_SIZE(rgb), NUMPRS_THOUSANDS|NUMPRS_USE_ALL, &np, rgb, LOCALE_USER_DEFAULT, 0); - todo_wine EXPECTFAIL; + EXPECTFAIL;
hres = wconvert_str(L"1,", ARRAY_SIZE(rgb), NUMPRS_THOUSANDS|NUMPRS_DECIMAL|NUMPRS_USE_ALL, &np, rgb, LOCALE_USER_DEFAULT, 0); - if (broken(1)) /* FIXME Reenable once Wine is less broken */ EXPECT(1,NUMPRS_THOUSANDS|NUMPRS_DECIMAL|NUMPRS_USE_ALL,NUMPRS_DECIMAL,2,0,0); - todo_wine ok(np.dwOutFlags == NUMPRS_DECIMAL, "Got dwOutFlags=%08x\n", np.dwOutFlags); EXPECT2(1,FAILDIG);
/* But not for their monetary equivalents */ diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c index 14ba63b9b2e..264b9f6594b 100644 --- a/dlls/oleaut32/variant.c +++ b/dlls/oleaut32/variant.c @@ -1607,6 +1607,9 @@ HRESULT WINAPI VarParseNumFromStr(const OLECHAR *lpszStr, LCID lcid, ULONG dwFla return DISP_E_TYPEMISMATCH;
VARIANT_GetLocalisedNumberChars(&chars, lcid, dwFlags); + if (chars.cDigitSeparator == chars.cDecimalPoint) + /* The decimal point completely masks the digit separator */ + chars.cDigitSeparator = 0; /* Setting the thousands separator to a non-breaking space implies regular * spaces are allowed too. But the converse is not true. */