From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Subject: [PATCH 1/3] oleaut32: Correctly get the Currency seperator in VarFormatCurrency
Message-Id: <PS2P216MB0066089FB34D6E389A0D5C7993790@PS2P216MB0066.KORP216.PROD.OUTLOOK.COM>
Date: Sun, 24 Feb 2019 07:00:32 +0000

LOCALE_SCURRENCY allows for 13 chracters including the NULL.

Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=46442
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
---
 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 470ea4e01b7..d6ce4a9f74a 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[8];
+    WCHAR buff[256], decimal[8], thousands[8], currency[13];
     CURRENCYFMTW numfmt;
 
     if (nDigits < 0)
@@ -2484,7 +2484,7 @@ HRESULT WINAPI VarFormatCurrency(LPVARIANT pVarIn, INT nDigits, INT nLeading,
     numfmt.lpThousandSep = thousands;
     GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, thousands, ARRAY_SIZE(thousands));
     numfmt.lpCurrencySymbol = currency;
-    GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, currency, ARRAY_SIZE(currency));
+    GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SCURRENCY, currency, ARRAY_SIZE(currency));
 
     /* use NLS as per VarFormatNumber() */
     if (GetCurrencyFormatW(LOCALE_USER_DEFAULT, 0, V_BSTR(&vStr), &numfmt, buff, ARRAY_SIZE(buff)))

-- 
2.20.1