Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7ebdd585
Commit
7ebdd585
authored
Jun 28, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 29, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a separate helper to load FT_Short values (Coverity).
parent
50a66f28
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
freetype.c
dlls/gdi32/freetype.c
+12
-4
No files found.
dlls/gdi32/freetype.c
View file @
7ebdd585
...
...
@@ -1511,7 +1511,15 @@ static LONG reg_load_dword(HKEY hkey, const WCHAR *value, DWORD *data)
return
ERROR_SUCCESS
;
}
static
LONG
reg_load_ftlong
(
HKEY
hkey
,
const
WCHAR
*
value
,
FT_Long
*
data
)
static
inline
LONG
reg_load_ftlong
(
HKEY
hkey
,
const
WCHAR
*
value
,
FT_Long
*
data
)
{
DWORD
dw
;
LONG
ret
=
reg_load_dword
(
hkey
,
value
,
&
dw
);
*
data
=
dw
;
return
ret
;
}
static
inline
LONG
reg_load_ftshort
(
HKEY
hkey
,
const
WCHAR
*
value
,
FT_Short
*
data
)
{
DWORD
dw
;
LONG
ret
=
reg_load_dword
(
hkey
,
value
,
&
dw
);
...
...
@@ -1557,7 +1565,7 @@ static void load_face(HKEY hkey_face, WCHAR *face_name, Family *family, void *bu
needed
=
sizeof
(
face
->
fs
);
RegQueryValueExW
(
hkey_face
,
face_font_sig_value
,
NULL
,
NULL
,
(
BYTE
*
)
&
face
->
fs
,
&
needed
);
if
(
reg_load_
dword
(
hkey_face
,
face_height_value
,
(
DWORD
*
)
&
face
->
size
.
height
)
!=
ERROR_SUCCESS
)
if
(
reg_load_
ftshort
(
hkey_face
,
face_height_value
,
&
face
->
size
.
height
)
!=
ERROR_SUCCESS
)
{
face
->
scalable
=
TRUE
;
memset
(
&
face
->
size
,
0
,
sizeof
(
face
->
size
));
...
...
@@ -1565,11 +1573,11 @@ static void load_face(HKEY hkey_face, WCHAR *face_name, Family *family, void *bu
else
{
face
->
scalable
=
FALSE
;
reg_load_
dword
(
hkey_face
,
face_width_value
,
(
DWORD
*
)
&
face
->
size
.
width
);
reg_load_
ftshort
(
hkey_face
,
face_width_value
,
&
face
->
size
.
width
);
reg_load_ftlong
(
hkey_face
,
face_size_value
,
&
face
->
size
.
size
);
reg_load_ftlong
(
hkey_face
,
face_x_ppem_value
,
&
face
->
size
.
x_ppem
);
reg_load_ftlong
(
hkey_face
,
face_y_ppem_value
,
&
face
->
size
.
y_ppem
);
reg_load_
dword
(
hkey_face
,
face_internal_leading_value
,
(
DWORD
*
)
&
face
->
size
.
internal_leading
);
reg_load_
ftshort
(
hkey_face
,
face_internal_leading_value
,
&
face
->
size
.
internal_leading
);
TRACE
(
"Adding bitmap size h %d w %d size %ld x_ppem %ld y_ppem %ld
\n
"
,
face
->
size
.
height
,
face
->
size
.
width
,
face
->
size
.
size
>>
6
,
...
...
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