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
200d795f
Commit
200d795f
authored
Oct 07, 2023
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Reject invalid values in SetMiterLimit().
parent
3f304014
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
3 deletions
+1
-3
dc.c
dlls/gdi32/dc.c
+1
-0
dc.c
dlls/gdi32/tests/dc.c
+0
-3
No files found.
dlls/gdi32/dc.c
View file @
200d795f
...
...
@@ -1372,6 +1372,7 @@ BOOL WINAPI SetMiterLimit( HDC hdc, FLOAT limit, FLOAT *old_limit )
DC_ATTR
*
dc_attr
;
if
(
!
(
dc_attr
=
get_dc_attr
(
hdc
)))
return
FALSE
;
if
(
dc_attr
->
emf
&&
!
EMFDC_SetMiterLimit
(
dc_attr
,
limit
))
return
0
;
if
(
limit
<
1
.
0
f
)
return
FALSE
;
if
(
old_limit
)
*
old_limit
=
dc_attr
->
miter_limit
;
dc_attr
->
miter_limit
=
limit
;
return
TRUE
;
...
...
dlls/gdi32/tests/dc.c
View file @
200d795f
...
...
@@ -101,15 +101,12 @@ static void test_dc_values(void)
limit
=
456
.
0
;
ret
=
SetMiterLimit
(
hdc
,
0
.
9
f
,
&
limit
);
todo_wine
ok
(
!
ret
,
"Unexpected return value.
\n
"
);
todo_wine
ok
(
limit
==
456
.
0
f
,
"Unexpected default miter limit %f.
\n
"
,
limit
);
limit
=
0
.
0
;
ret
=
SetMiterLimit
(
hdc
,
1
.
0
f
,
&
limit
);
ok
(
ret
,
"Unexpected return value.
\n
"
);
todo_wine
ok
(
limit
==
10
.
0
f
,
"Unexpected default miter limit %f.
\n
"
,
limit
);
DeleteDC
(
hdc
);
...
...
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