[WINNLS] Fix of GetCurrencyFormatW to handle "32" grouping format (#2719)

This commit is contained in:
Kyle Katarn 2020-05-10 08:34:35 +02:00 committed by GitHub
parent 5ebde7139a
commit c1fad34755
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1762,7 +1762,7 @@ INT WINAPI GetCurrencyFormatW(LCID lcid, DWORD dwFlags,
*szOut-- = *lpszDec--; /* Write decimal separator */
}
dwGroupCount = lpFormat->Grouping;
dwGroupCount = lpFormat->Grouping == 32 ? 3 : lpFormat->Grouping;
/* Write the remaining whole number digits, including grouping chars */
while (szSrc >= lpszValue && *szSrc >= '0' && *szSrc <= '9')
@ -1791,6 +1791,8 @@ INT WINAPI GetCurrencyFormatW(LCID lcid, DWORD dwFlags,
*szOut-- = *lpszGrp--; /* Write grouping char */
dwCurrentGroupCount = 0;
if (lpFormat->Grouping == 32)
dwGroupCount = 2; /* Indic grouping: 3 then 2 */
}
}
if (dwState & NF_ROUND)