Alistair Leslie-Hughes : oleaut32: Correctly get the Grouping separator.

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


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

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

oleaut32: Correctly get the Grouping separator.

LOCALE_SGROUPING allows for 10 characters 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 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/oleaut32/varformat.c b/dlls/oleaut32/varformat.c
index 91b3c16..757c4f9 100644
--- a/dlls/oleaut32/varformat.c
+++ b/dlls/oleaut32/varformat.c
@@ -2284,9 +2284,9 @@ HRESULT WINAPI VarFormatNumber(LPVARIANT pVarIn, INT nDigits, INT nLeading, INT
 
     if (nGrouping == -2)
     {
-      WCHAR grouping[16];
+      WCHAR grouping[10];
       grouping[2] = '\0';
-      GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, grouping, ARRAY_SIZE(grouping));
+      GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SGROUPING, grouping, ARRAY_SIZE(grouping));
       numfmt.Grouping = grouping[2] == '2' ? 32 : grouping[0] - '0';
     }
     else if (nGrouping == -1)
@@ -2460,9 +2460,9 @@ HRESULT WINAPI VarFormatCurrency(LPVARIANT pVarIn, INT nDigits, INT nLeading,
 
     if (nGrouping == -2)
     {
-      WCHAR grouping[16];
+      WCHAR grouping[10];
       grouping[2] = '\0';
-      GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SDECIMAL, grouping, ARRAY_SIZE(grouping));
+      GetLocaleInfoW(LOCALE_USER_DEFAULT, LOCALE_SGROUPING, grouping, ARRAY_SIZE(grouping));
       numfmt.Grouping = grouping[2] == '2' ? 32 : grouping[0] - '0';
     }
     else if (nGrouping == -1)




More information about the wine-cvs mailing list