Author: akhaldi
Date: Thu Aug 1 16:15:11 2013
New Revision: 59614
URL:
http://svn.reactos.org/svn/reactos?rev=59614&view=rev
Log:
[KERNEL32]
* Sync GetLocaleInfoW with Wine 1.5.26.
CORE-7281
Modified:
trunk/reactos/dll/win32/kernel32/winnls/string/lang.c
Modified: trunk/reactos/dll/win32/kernel32/winnls/string/lang.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/winnls/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/winnls/string/lang.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/winnls/string/lang.c [iso-8859-1] Thu Aug 1 16:15:11
2013
@@ -754,6 +754,10 @@
return ret;
}
+static int get_value_base_by_lctype( LCTYPE lctype )
+{
+ return lctype == LOCALE_ILANGUAGE || lctype == LOCALE_IDEFAULTLANGUAGE ? 16 : 10;
+}
/******************************************************************************
* GetLocaleInfoW (KERNEL32.@)
@@ -807,7 +811,7 @@
if (ret > 0)
{
WCHAR *end;
- UINT number = strtolW( tmp, &end, 10 );
+ UINT number = strtolW( tmp, &end, get_value_base_by_lctype(
lctype ) );
if (*end) /* invalid number */
{
SetLastError( ERROR_INVALID_FLAGS );
@@ -880,7 +884,7 @@
if (!tmp) return 0;
memcpy( tmp, p + 1, *p * sizeof(WCHAR) );
tmp[*p] = 0;
- number = strtolW( tmp, &end, 10 );
+ number = strtolW( tmp, &end, get_value_base_by_lctype( lctype ) );
if (!*end)
memcpy( buffer, &number, sizeof(number) );
else /* invalid number */