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
e33f327f
Commit
e33f327f
authored
Jul 22, 2002
by
Shachar Shemesh
Committed by
Alexandre Julliard
Jul 22, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Now checks that the GCP_REORDER flag is set before trying to access
any of the fields that depend on this flag.
parent
3c5eba06
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
19 deletions
+11
-19
font.c
objects/font.c
+11
-19
No files found.
objects/font.c
View file @
e33f327f
...
...
@@ -2256,10 +2256,14 @@ GetCharacterPlacementA(HDC hdc, LPCSTR lpString, INT uCount,
memcpy
(
&
resultsW
,
lpResults
,
sizeof
(
resultsW
));
lpStringW
=
FONT_mbtowc
(
hdc
,
lpString
,
uCount
,
&
uCountW
,
&
font_cp
);
if
(
lpResults
->
lpOutString
)
resultsW
.
lpOutString
=
HeapAlloc
(
GetProcessHeap
(),
0
,
uCountW
);
else
resultsW
.
lpOutString
=
NULL
;
if
(
dwFlags
&
GCP_REORDER
)
{
/* If the REORDER flag is not set, this field is ignored anyways */
if
(
lpResults
->
lpOutString
)
resultsW
.
lpOutString
=
HeapAlloc
(
GetProcessHeap
(),
0
,
uCountW
);
else
resultsW
.
lpOutString
=
NULL
;
}
ret
=
GetCharacterPlacementW
(
hdc
,
lpStringW
,
uCountW
,
nMaxExtent
,
&
resultsW
,
dwFlags
);
...
...
@@ -2330,21 +2334,9 @@ GetCharacterPlacementW(
/* return number of initialized fields */
lpResults
->
nGlyphs
=
nSet
;
if
(
dwFlags
==
0
)
{
/* Treat the case where no special handling was requested in a fastpath way */
/* copy will do if the GCP_REORDER flag is not set */
if
(
lpResults
->
lpOutString
)
lstrcpynW
(
lpResults
->
lpOutString
,
lpString
,
uCount
);
if
(
lpResults
->
lpOrder
)
{
for
(
i
=
0
;
i
<
nSet
;
i
++
)
lpResults
->
lpOrder
[
i
]
=
i
;
}
}
else
if
((
dwFlags
&
GCP_REORDER
)
!=
0
)
{
/* MSDN says lpOutString and lpOrder are ignored if GCP_REORDER not set */
WORD
*
pwCharType
;
int
run_end
;
/* Keep a static table that translates the C2 types to something meaningful */
...
...
@@ -2365,7 +2357,7 @@ GetCharacterPlacementW(
/* Fill in the order array with directionality values */
GetStringTypeW
(
CT_CTYPE2
,
lpString
,
uCount
,
pwCharType
);
/* The complete and correct (at l
i
st according to MS) BiDi algorythm is not
/* The complete and correct (at l
ea
st according to MS) BiDi algorythm is not
* yet implemented here. Instead, we just make sure that consecutive runs of
* the same direction (or neutral) are ordered correctly
*/
...
...
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