Alistair Leslie-Hughes : oleaut32: Correctly get the thousands separator in VarFormatCurrency.

Alexandre Julliard julliard at winehq.org
Mon Feb 25 15:10:34 CST 2019


Module: wine
Branch: master
Commit: 1a842d18c9980154667d2d00d2ae2153c1ee173e
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=1a842d18c9980154667d2d00d2ae2153c1ee173e

Author: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date:   Sun Feb 24 07:00:34 2019 +0000

oleaut32: Correctly get the thousands separator in VarFormatCurrency.

LOCALE_STHOUSAND allows for 4 chracters including the NULL.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/oleaut32/varformat.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/oleaut32/varformat.c b/dlls/oleaut32/varformat.c
index d6ce4a9..91b3c16 100644
--- a/dlls/oleaut32/varformat.c
+++ b/dlls/oleaut32/varformat.c
@@ -2443,7 +2443,7 @@ HRESULT WINAPI VarFormatCurrency(LPVARIANT pVarIn, INT nDigits, INT nLeading,
 
   if (SUCCEEDED(hRet))
   {
-    WCHAR buff[256], decimal[8], thousands[8], currency[13];
+    WCHAR buff[256], decimal[8], thousands[4], currency[13];
     CURRENCYFMTW numfmt;
 
     if (nDigits < 0)
@@ -2482,7 +2482,7 @@ HRESULT WINAPI VarFormatCurrency(LPVARIANT pVarIn, INT nDigits, INT nLeading,
     numfmt.lpDecimalSep = decimal;
     GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, decimal, ARRAY_SIZE(decimal));
     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;
     GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SCURRENCY, currency, ARRAY_SIZE(currency));
 




More information about the wine-cvs mailing list