Commit 1a842d18 authored by Alistair Leslie-Hughes's avatar Alistair Leslie-Hughes Committed by Alexandre Julliard

oleaut32: Correctly get the thousands separator in VarFormatCurrency.

LOCALE_STHOUSAND allows for 4 chracters including the NULL. Signed-off-by: 's avatarAlistair Leslie-Hughes <leslie_alistair@hotmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 29cf8ee8
...@@ -2443,7 +2443,7 @@ HRESULT WINAPI VarFormatCurrency(LPVARIANT pVarIn, INT nDigits, INT nLeading, ...@@ -2443,7 +2443,7 @@ HRESULT WINAPI VarFormatCurrency(LPVARIANT pVarIn, INT nDigits, INT nLeading,
if (SUCCEEDED(hRet)) if (SUCCEEDED(hRet))
{ {
WCHAR buff[256], decimal[8], thousands[8], currency[13]; WCHAR buff[256], decimal[8], thousands[4], currency[13];
CURRENCYFMTW numfmt; CURRENCYFMTW numfmt;
if (nDigits < 0) if (nDigits < 0)
...@@ -2482,7 +2482,7 @@ HRESULT WINAPI VarFormatCurrency(LPVARIANT pVarIn, INT nDigits, INT nLeading, ...@@ -2482,7 +2482,7 @@ HRESULT WINAPI VarFormatCurrency(LPVARIANT pVarIn, INT nDigits, INT nLeading,
numfmt.lpDecimalSep = decimal; numfmt.lpDecimalSep = decimal;
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, decimal, ARRAY_SIZE(decimal)); GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, decimal, ARRAY_SIZE(decimal));
numfmt.lpThousandSep = thousands; numfmt.lpThousandSep = thousands;
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, thousands, ARRAY_SIZE(thousands)); GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_STHOUSAND, thousands, ARRAY_SIZE(thousands));
numfmt.lpCurrencySymbol = currency; numfmt.lpCurrencySymbol = currency;
GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SCURRENCY, currency, ARRAY_SIZE(currency)); GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SCURRENCY, currency, ARRAY_SIZE(currency));
......
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