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
b6b7e915
Commit
b6b7e915
authored
Jul 27, 2007
by
Evan Stade
Committed by
Alexandre Julliard
Jul 30, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Check custom dash array for bad properties.
parent
a35206e0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
pen.c
dlls/gdiplus/pen.c
+12
-0
pen.c
dlls/gdiplus/tests/pen.c
+0
-2
No files found.
dlls/gdiplus/pen.c
View file @
b6b7e915
...
...
@@ -223,9 +223,21 @@ GpStatus WINGDIPAPI GdipSetPenCustomStartCap(GpPen *pen, GpCustomLineCap* custom
GpStatus
WINGDIPAPI
GdipSetPenDashArray
(
GpPen
*
pen
,
GDIPCONST
REAL
*
dash
,
INT
count
)
{
INT
i
;
REAL
sum
=
0
;
if
(
!
pen
||
!
dash
)
return
InvalidParameter
;
for
(
i
=
0
;
i
<
count
;
i
++
){
sum
+=
dash
[
i
];
if
(
dash
[
i
]
<
0
.
0
)
return
InvalidParameter
;
}
if
(
sum
==
0
.
0
&&
count
)
return
InvalidParameter
;
GdipFree
(
pen
->
dashes
);
pen
->
dashes
=
NULL
;
...
...
dlls/gdiplus/tests/pen.c
View file @
b6b7e915
...
...
@@ -176,11 +176,9 @@ static void test_dasharray(void)
/* Some invalid array values. */
status
=
GdipSetPenDashArray
(
pen
,
&
dashes
[
7
],
5
);
todo_wine
expect
(
InvalidParameter
,
status
);
dashes
[
9
]
=
-
1
.
0
;
status
=
GdipSetPenDashArray
(
pen
,
&
dashes
[
7
],
5
);
todo_wine
expect
(
InvalidParameter
,
status
);
/* Try to set with count = 0. */
...
...
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