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
83a3a5c7
Commit
83a3a5c7
authored
Mar 23, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Fix mbcs initialization for UTF-8 codepage.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
29fe1435
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
mbcs.c
dlls/msvcrt/mbcs.c
+7
-5
No files found.
dlls/msvcrt/mbcs.c
View file @
83a3a5c7
...
...
@@ -220,7 +220,7 @@ threadmbcinfo* create_mbcinfo(int cp, LCID lcid, threadmbcinfo *old_mbcinfo)
WORD
chartypes
[
256
];
char
bufA
[
256
];
WCHAR
bufW
[
256
],
lowW
[
256
],
upW
[
256
];
int
charcount
;
int
charcount
,
maxchar
;
int
ret
;
int
i
;
...
...
@@ -288,7 +288,7 @@ threadmbcinfo* create_mbcinfo(int cp, LCID lcid, threadmbcinfo *old_mbcinfo)
bytes
+=
2
;
}
if
(
cpi
.
MaxCharSize
>
1
)
if
(
cpi
.
MaxCharSize
==
2
)
{
/* trail bytes not available through kernel32 but stored in a structure in msvcrt */
struct
cp_extra_info_t
*
cpextra
=
g_cpextrainfo
;
...
...
@@ -316,10 +316,12 @@ threadmbcinfo* create_mbcinfo(int cp, LCID lcid, threadmbcinfo *old_mbcinfo)
else
mbcinfo
->
ismbcodepage
=
0
;
maxchar
=
(
newcp
==
CP_UTF8
)
?
128
:
256
;
/* we can't use GetStringTypeA directly because we don't have a locale - only a code page
*/
charcount
=
0
;
for
(
i
=
0
;
i
<
256
;
i
++
)
for
(
i
=
0
;
i
<
maxchar
;
i
++
)
if
(
!
(
mbcinfo
->
mbctype
[
i
+
1
]
&
_M1
))
bufA
[
charcount
++
]
=
i
;
...
...
@@ -335,7 +337,7 @@ threadmbcinfo* create_mbcinfo(int cp, LCID lcid, threadmbcinfo *old_mbcinfo)
LCMapStringW
(
lcid
,
LCMAP_UPPERCASE
,
bufW
,
charcount
,
upW
,
charcount
);
charcount
=
0
;
for
(
i
=
0
;
i
<
256
;
i
++
)
for
(
i
=
0
;
i
<
maxchar
;
i
++
)
if
(
!
(
mbcinfo
->
mbctype
[
i
+
1
]
&
_M1
))
{
if
(
chartypes
[
charcount
]
&
C1_UPPER
)
...
...
@@ -359,7 +361,7 @@ threadmbcinfo* create_mbcinfo(int cp, LCID lcid, threadmbcinfo *old_mbcinfo)
}
charcount
=
0
;
for
(
i
=
0
;
i
<
256
;
i
++
)
for
(
i
=
0
;
i
<
maxchar
;
i
++
)
{
if
(
!
(
mbcinfo
->
mbctype
[
i
+
1
]
&
_M1
))
{
...
...
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