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
c4f4b01b
Commit
c4f4b01b
authored
Apr 08, 2006
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 10, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: GetCharABCWidthsW should not crash on a NULL handle.
parent
1bf5e2da
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
font.c
dlls/gdi/font.c
+2
-0
font.c
dlls/gdi/tests/font.c
+13
-0
No files found.
dlls/gdi/font.c
View file @
c4f4b01b
...
...
@@ -2330,6 +2330,8 @@ BOOL WINAPI GetCharABCWidthsW( HDC hdc, UINT firstChar, UINT lastChar,
unsigned
int
i
;
BOOL
ret
=
FALSE
;
if
(
!
dc
)
return
FALSE
;
if
(
dc
->
gdiFont
)
ret
=
WineEngGetCharABCWidths
(
dc
->
gdiFont
,
firstChar
,
lastChar
,
abc
);
else
...
...
dlls/gdi/tests/font.c
View file @
c4f4b01b
...
...
@@ -323,6 +323,18 @@ static void test_GdiGetCharDimensions(void)
DeleteDC
(
hdc
);
}
static
void
test_GetCharABCWidthsW
(
void
)
{
BOOL
ret
;
ABC
abc
[
1
];
typedef
BOOL
(
WINAPI
*
fnGetCharABCWidthsW
)(
HDC
hdc
,
UINT
first
,
UINT
last
,
LPABC
abc
);
fnGetCharABCWidthsW
GetCharABCWidthsW
=
(
fnGetCharABCWidthsW
)
GetProcAddress
(
LoadLibrary
(
"gdi32"
),
"GetCharABCWidthsW"
);
if
(
!
GetCharABCWidthsW
)
return
;
ret
=
GetCharABCWidthsW
(
NULL
,
'a'
,
'a'
,
abc
);
ok
(
!
ret
,
"GetCharABCWidthsW should have returned FALSE
\n
"
);
}
static
void
test_text_extents
(
void
)
{
LOGFONTA
lf
;
...
...
@@ -353,5 +365,6 @@ START_TEST(font)
test_bitmap_font
();
test_bitmap_font_metrics
();
test_GdiGetCharDimensions
();
test_GetCharABCWidthsW
();
test_text_extents
();
}
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