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
b35faeb5
Commit
b35faeb5
authored
May 12, 2022
by
Piotr Caban
Committed by
Alexandre Julliard
May 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Reject UTF-8 locales in setlocale function.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fac521ee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
msvcr110.c
dlls/msvcr110/tests/msvcr110.c
+1
-1
locale.c
dlls/msvcrt/locale.c
+8
-0
No files found.
dlls/msvcr110/tests/msvcr110.c
View file @
b35faeb5
...
@@ -134,7 +134,7 @@ static void test_setlocale(void)
...
@@ -134,7 +134,7 @@ static void test_setlocale(void)
ok
(
ret
!=
NULL
,
"expected success, but got NULL
\n
"
);
ok
(
ret
!=
NULL
,
"expected success, but got NULL
\n
"
);
if
(
!
strcmp
(
names
[
i
],
"syr-SY"
)
&&
GetACP
()
==
CP_UTF8
)
if
(
!
strcmp
(
names
[
i
],
"syr-SY"
)
&&
GetACP
()
==
CP_UTF8
)
{
{
todo_wine
ok
(
!
strcmp
(
ret
,
"LC_COLLATE=syr-SY;LC_CTYPE=EN-US;LC_MONETARY=syr-SY;"
ok
(
!
strcmp
(
ret
,
"LC_COLLATE=syr-SY;LC_CTYPE=EN-US;LC_MONETARY=syr-SY;"
"LC_NUMERIC=syr-SY;LC_TIME=syr-SY"
),
"got %s
\n
"
,
ret
);
"LC_NUMERIC=syr-SY;LC_TIME=syr-SY"
),
"got %s
\n
"
,
ret
);
}
}
else
else
...
...
dlls/msvcrt/locale.c
View file @
b35faeb5
...
@@ -1334,6 +1334,14 @@ static pthreadlocinfo create_locinfo(int category,
...
@@ -1334,6 +1334,14 @@ static pthreadlocinfo create_locinfo(int category,
}
}
for
(
i
=
1
;
i
<
6
;
i
++
)
{
for
(
i
=
1
;
i
<
6
;
i
++
)
{
#if _MSVCR_VER < 140
if
(
i
==
LC_CTYPE
&&
cp
[
i
]
==
CP_UTF8
)
{
locale_name
[
i
]
=
NULL
;
locale_len
[
i
]
=
0
;
lcid
[
i
]
=
old_locinfo
?
old_locinfo
->
lc_handle
[
i
]
:
0
;
cp
[
i
]
=
old_locinfo
?
old_locinfo
->
lc_id
[
i
].
wCodePage
:
0
;
}
#endif
if
(
category
!=
LC_ALL
&&
category
!=
i
)
{
if
(
category
!=
LC_ALL
&&
category
!=
i
)
{
if
(
old_locinfo
)
{
if
(
old_locinfo
)
{
lcid
[
i
]
=
old_locinfo
->
lc_handle
[
i
];
lcid
[
i
]
=
old_locinfo
->
lc_handle
[
i
];
...
...
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