projects
/
reactos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Merge from trunk up to r45543
[reactos.git]
/
dll
/
win32
/
kernel32
/
misc
/
lcformat.c
diff --git
a/dll/win32/kernel32/misc/lcformat.c
b/dll/win32/kernel32/misc/lcformat.c
index
2cbabe8
..
57cca52
100644
(file)
--- a/
dll/win32/kernel32/misc/lcformat.c
+++ b/
dll/win32/kernel32/misc/lcformat.c
@@
-109,7
+109,7
@@
BOOL NLS_isSystemLocale(LCID lcid)
}
/**************************************************************************
}
/**************************************************************************
- * NLS_
isSystem
Locale <internal>
+ * NLS_
getDefault
Locale <internal>
*
* Return default system or user locale
*/
*
* Return default system or user locale
*/
@@
-1023,7
+1023,7
@@
INT WINAPI GetNumberFormatW(LCID lcid, DWORD dwFlags,
{
lcid = NLS_getDefaultLocale(lcid);
}
{
lcid = NLS_getDefaultLocale(lcid);
}
- else if(!IsValidLocale(lcid,
0
))
+ else if(!IsValidLocale(lcid,
LCID_INSTALLED
))
{
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
{
SetLastError(ERROR_INVALID_PARAMETER);
return 0;
@@
-1403,8
+1403,17
@@
INT WINAPI GetCurrencyFormatW(LCID lcid, DWORD dwFlags,
lpCurrencyStr,
cchOut);
lpCurrencyStr,
cchOut);
+ if(NLS_isSystemLocale(lcid))
+ {
+ lcid = NLS_getDefaultLocale(lcid);
+ }
+ else if(!IsValidLocale(lcid, LCID_INSTALLED))
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return 0;
+ }
+
if (!lpszValue || cchOut < 0 || (cchOut > 0 && !lpCurrencyStr) ||
if (!lpszValue || cchOut < 0 || (cchOut > 0 && !lpCurrencyStr) ||
- !IsValidLocale(lcid, 0) ||
(lpFormat && (dwFlags || !lpFormat->lpDecimalSep || !lpFormat->lpThousandSep ||
!lpFormat->lpCurrencySymbol || lpFormat->NegativeOrder > 15 ||
lpFormat->PositiveOrder > 3)))
(lpFormat && (dwFlags || !lpFormat->lpDecimalSep || !lpFormat->lpThousandSep ||
!lpFormat->lpCurrencySymbol || lpFormat->NegativeOrder > 15 ||
lpFormat->PositiveOrder > 3)))