return ret;
}
+static int get_value_base_by_lctype( LCTYPE lctype )
+{
+ return lctype == LOCALE_ILANGUAGE || lctype == LOCALE_IDEFAULTLANGUAGE ? 16 : 10;
+}
/******************************************************************************
* GetLocaleInfoW (KERNEL32.@)
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 );
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 */