oleaut32: Allow longer regional settings values.
Only the first character matters but the extra ones should not prevent it from being used. Signed-off-by: Francois Gouget <fgouget@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2e302e8d8c
commit
d07d4ef799
|
@ -2324,7 +2324,7 @@ static void test_VarParseNumFromStrMisc(void)
|
|||
SetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SMONTHOUSANDSEP, L" \xa0");
|
||||
|
||||
hres = wconvert_str(L"1 000", ARRAY_SIZE(rgb), NUMPRS_THOUSANDS|NUMPRS_USE_ALL, &np, rgb, LOCALE_USER_DEFAULT, 0);
|
||||
todo_wine EXPECT(1,NUMPRS_THOUSANDS|NUMPRS_USE_ALL,NUMPRS_THOUSANDS,5,0,3);
|
||||
EXPECT(1,NUMPRS_THOUSANDS|NUMPRS_USE_ALL,NUMPRS_THOUSANDS,5,0,3);
|
||||
EXPECTRGB(0,1); /* Don't test extra digits, see "1,000" test */
|
||||
EXPECTRGB(4,FAILDIG);
|
||||
|
||||
|
|
|
@ -1514,11 +1514,11 @@ typedef struct tagVARIANT_NUMBER_CHARS
|
|||
|
||||
#define GET_NUMBER_TEXT(fld,name) \
|
||||
buff[0] = 0; \
|
||||
if (!GetLocaleInfoW(lcid, lctype|fld, buff, 2)) \
|
||||
if (!GetLocaleInfoW(lcid, lctype|fld, buff, ARRAY_SIZE(buff))) \
|
||||
WARN("buffer too small for " #fld "\n"); \
|
||||
else \
|
||||
if (buff[0]) lpChars->name = buff[0]; \
|
||||
TRACE("lcid 0x%x, " #name "=%d '%c'\n", lcid, lpChars->name, lpChars->name)
|
||||
TRACE("lcid 0x%x, " #name "=%s\n", lcid, wine_dbgstr_wn(&lpChars->name, 1))
|
||||
|
||||
/* Get the valid number characters for an lcid */
|
||||
static void VARIANT_GetLocalisedNumberChars(VARIANT_NUMBER_CHARS *lpChars, LCID lcid, DWORD dwFlags)
|
||||
|
|
Loading…
Reference in New Issue