Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
505406fc
Commit
505406fc
authored
Aug 26, 2016
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 27, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Fixed handling LOCALE_NAME_USER_DEFAULT in GetLocaleInfoEx.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d26c0ca2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
locale.c
dlls/kernel32/locale.c
+1
-1
locale.c
dlls/kernel32/tests/locale.c
+7
-1
No files found.
dlls/kernel32/locale.c
View file @
505406fc
...
@@ -1726,7 +1726,7 @@ INT WINAPI GetLocaleInfoEx(LPCWSTR locale, LCTYPE info, LPWSTR buffer, INT len)
...
@@ -1726,7 +1726,7 @@ INT WINAPI GetLocaleInfoEx(LPCWSTR locale, LCTYPE info, LPWSTR buffer, INT len)
if
(
!
lcid
)
return
0
;
if
(
!
lcid
)
return
0
;
/* special handling for neutral locale names */
/* special handling for neutral locale names */
if
(
info
==
LOCALE_SNAME
&&
strlenW
(
locale
)
==
2
)
if
(
info
==
LOCALE_SNAME
&&
locale
&&
strlenW
(
locale
)
==
2
)
{
{
if
(
len
&&
len
<
3
)
if
(
len
&&
len
<
3
)
{
{
...
...
dlls/kernel32/tests/locale.c
View file @
505406fc
...
@@ -4283,7 +4283,7 @@ static void test_IdnToUnicode(void)
...
@@ -4283,7 +4283,7 @@ static void test_IdnToUnicode(void)
static
void
test_GetLocaleInfoEx
(
void
)
static
void
test_GetLocaleInfoEx
(
void
)
{
{
static
const
WCHAR
enW
[]
=
{
'e'
,
'n'
,
0
};
static
const
WCHAR
enW
[]
=
{
'e'
,
'n'
,
0
};
WCHAR
bufferW
[
80
];
WCHAR
bufferW
[
80
]
,
buffer2
[
80
]
;
INT
ret
;
INT
ret
;
if
(
!
pGetLocaleInfoEx
)
if
(
!
pGetLocaleInfoEx
)
...
@@ -4354,6 +4354,12 @@ static void test_GetLocaleInfoEx(void)
...
@@ -4354,6 +4354,12 @@ static void test_GetLocaleInfoEx(void)
ok
(
!
lstrcmpW
(
bufferW
,
ptr
->
name
),
"%s: got wrong LOCALE_SNAME %s
\n
"
,
wine_dbgstr_w
(
ptr
->
name
),
wine_dbgstr_w
(
bufferW
));
ok
(
!
lstrcmpW
(
bufferW
,
ptr
->
name
),
"%s: got wrong LOCALE_SNAME %s
\n
"
,
wine_dbgstr_w
(
ptr
->
name
),
wine_dbgstr_w
(
bufferW
));
ptr
++
;
ptr
++
;
}
}
ret
=
pGetLocaleInfoEx
(
LOCALE_NAME_USER_DEFAULT
,
LOCALE_SNAME
,
bufferW
,
sizeof
(
bufferW
)
/
sizeof
(
WCHAR
));
ok
(
ret
&&
ret
==
lstrlenW
(
bufferW
)
+
1
,
"got ret value %d
\n
"
,
ret
);
ret
=
GetLocaleInfoW
(
GetUserDefaultLCID
(),
LOCALE_SNAME
,
buffer2
,
sizeof
(
buffer2
)
/
sizeof
(
WCHAR
));
ok
(
ret
&&
ret
==
lstrlenW
(
buffer2
)
+
1
,
"got ret value %d
\n
"
,
ret
);
ok
(
!
lstrcmpW
(
bufferW
,
buffer2
),
"LOCALE_SNAMEs don't match %s %s
\n
"
,
wine_dbgstr_w
(
bufferW
),
wine_dbgstr_w
(
buffer2
));
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment