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
b549ae11
Commit
b549ae11
authored
Nov 28, 2023
by
Santino Mazza
Committed by
Alexandre Julliard
Feb 12, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mlang: Fix bug with codepage priority in GetStrCodePages.
parent
bc623148
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
mlang.c
dlls/mlang/mlang.c
+3
-6
mlang.c
dlls/mlang/tests/mlang.c
+1
-1
No files found.
dlls/mlang/mlang.c
View file @
b549ae11
...
...
@@ -3336,23 +3336,20 @@ static HRESULT WINAPI fnIMLangFontLink2_GetStrCodePages( IMLangFontLink2* iface,
for
(
i
=
0
;
i
<
src_len
;
i
++
)
{
DWORD
cp
,
next_cp
=
0
;
DWORD
cp
=
0
;
HRESULT
ret
;
ret
=
IMLangFontLink2_GetCharCodePages
(
iface
,
src
[
i
],
&
cp
);
if
(
i
+
1
<
src_len
)
ret
=
IMLangFontLink2_GetCharCodePages
(
iface
,
src
[
i
+
1
],
&
next_cp
);
if
(
ret
!=
S_OK
)
return
E_FAIL
;
if
(
!
cps
)
cps
=
cp
;
else
if
((
cps
&
cp
)
!=
0
)
cps
&=
cp
;
else
if
((
cps
&
cp
)
!=
0
&&
!
((
priority_cp
&
cps
)
^
(
priority_cp
&
cp
)))
cps
&=
cp
;
else
{
i
--
;
break
;
}
if
((
priority_cp
&
cps
)
&&
!
(
priority_cp
&
next_cp
))
break
;
}
if
(
codepages
)
*
codepages
=
cps
;
...
...
dlls/mlang/tests/mlang.c
View file @
b549ae11
...
...
@@ -1330,7 +1330,7 @@ static void IMLangFontLink_Test(IMLangFontLink* iMLFL)
ret
=
IMLangFontLink_GetStrCodePages
(
iMLFL
,
L"\uff90a"
,
2
,
FS_LATIN1
,
&
dwCodePages
,
&
processed
);
ok
(
ret
==
S_OK
,
"IMLangFontLink_GetStrCodePages error %lx
\n
"
,
ret
);
ok
(
dwCodePages
==
dwCmpCodePages
,
"expected %lx, got %lx
\n
"
,
dwCmpCodePages
,
dwCodePages
);
todo_wine
ok
(
processed
==
1
,
"expected 1, got %ld
\n
"
,
processed
);
ok
(
processed
==
1
,
"expected 1, got %ld
\n
"
,
processed
);
dwCodePages
=
0xffff
;
processed
=
-
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