[PATCH 3/3] oleaut32: Correctly get the Grouping seperator
Alistair Leslie-Hughes
leslie_alistair at hotmail.com
Sun Feb 24 01:00:35 CST 2019
LOCALE_SGROUPING allows for 10 characters including the null.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
---
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 91b3c167dd8..757c4f9c3ea 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)
--
2.20.1
More information about the wine-devel
mailing list