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
c4ab42d8
Commit
c4ab42d8
authored
Jun 14, 2016
by
Piotr Caban
Committed by
Alexandre Julliard
Jun 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fix C locale handling in wcstombs.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f091d9ed
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
wcs.c
dlls/msvcrt/wcs.c
+18
-0
No files found.
dlls/msvcrt/wcs.c
View file @
c4ab42d8
...
...
@@ -477,6 +477,24 @@ static MSVCRT_size_t MSVCRT_wcsrtombs_l(char *mbstr, const MSVCRT_wchar_t **wcst
else
locinfo
=
locale
->
locinfo
;
if
(
!
locinfo
->
lc_codepage
)
{
MSVCRT_size_t
i
;
if
(
!
mbstr
)
return
strlenW
(
*
wcstr
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
if
((
*
wcstr
)[
i
]
>
255
)
{
*
MSVCRT__errno
()
=
MSVCRT_EILSEQ
;
return
-
1
;
}
mbstr
[
i
]
=
(
*
wcstr
)[
i
];
if
(
!
(
*
wcstr
)[
i
])
break
;
}
return
i
;
}
if
(
!
mbstr
)
{
tmp
=
WideCharToMultiByte
(
locinfo
->
lc_codepage
,
WC_NO_BEST_FIT_CHARS
,
*
wcstr
,
-
1
,
NULL
,
0
,
NULL
,
&
used_default
)
-
1
;
...
...
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