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
09176c3a
Commit
09176c3a
authored
Jun 09, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Treat empty locale name as LOCALE_INVARIANT.
parent
42cbc05e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
locale.c
dlls/kernel32/locale.c
+7
-0
locale.c
dlls/kernel32/tests/locale.c
+4
-2
No files found.
dlls/kernel32/locale.c
View file @
09176c3a
...
...
@@ -453,6 +453,13 @@ static void parse_locale_name( const WCHAR *str, struct locale_name *name )
name
->
win_name
[
0
]
=
0
;
lstrcpynW
(
name
->
lang
,
str
,
sizeof
(
name
->
lang
)
/
sizeof
(
WCHAR
)
);
if
(
!*
name
->
lang
)
{
name
->
lcid
=
LOCALE_INVARIANT
;
name
->
matches
=
4
;
return
;
}
if
(
!
(
p
=
strpbrkW
(
name
->
lang
,
sepW
)))
{
if
(
!
strcmpW
(
name
->
lang
,
posixW
)
||
!
strcmpW
(
name
->
lang
,
cW
))
...
...
dlls/kernel32/tests/locale.c
View file @
09176c3a
...
...
@@ -2418,9 +2418,9 @@ static void test_LocaleNameToLCID(void)
buffer
[
0
]
=
0
;
SetLastError
(
0xdeadbeef
);
lcid
=
pLocaleNameToLCID
(
LOCALE_NAME_INVARIANT
,
0
);
todo_wine
ok
(
lcid
==
0x7F
,
"Expected lcid = 0x7F, got %08x, error %d
\n
"
,
lcid
,
GetLastError
());
ok
(
lcid
==
0x7F
,
"Expected lcid = 0x7F, got %08x, error %d
\n
"
,
lcid
,
GetLastError
());
ret
=
pLCIDToLocaleName
(
lcid
,
buffer
,
LOCALE_NAME_MAX_LENGTH
,
0
);
ok
(
ret
>
0
,
"Expected ret > 0, got %d, error %d
\n
"
,
ret
,
GetLastError
());
todo_wine
ok
(
ret
>
0
,
"Expected ret > 0, got %d, error %d
\n
"
,
ret
,
GetLastError
());
trace
(
"%08x, %s
\n
"
,
lcid
,
wine_dbgstr_w
(
buffer
));
/* bad name */
...
...
@@ -4091,6 +4091,8 @@ static void test_IsValidLocaleName(void)
ok
(
!
ret
,
"IsValidLocaleName should have failed
\n
"
);
ret
=
pIsValidLocaleName
(
zzzzW
);
ok
(
!
ret
,
"IsValidLocaleName should have failed
\n
"
);
ret
=
pIsValidLocaleName
(
LOCALE_NAME_INVARIANT
);
ok
(
ret
,
"IsValidLocaleName failed
\n
"
);
}
static
void
test_CompareStringOrdinal
(
void
)
...
...
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