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
0943fcf3
Commit
0943fcf3
authored
Feb 28, 2018
by
Vincent Povirk
Committed by
Alexandre Julliard
Feb 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus: Silently ignore empty rectangles in GdipAddPathRectangles.
Signed-off-by:
Vincent Povirk
<
vincent@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
beb83eb4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
graphicspath.c
dlls/gdiplus/graphicspath.c
+3
-0
graphicspath.c
dlls/gdiplus/tests/graphicspath.c
+24
-0
No files found.
dlls/gdiplus/graphicspath.c
View file @
0943fcf3
...
...
@@ -2306,6 +2306,9 @@ GpStatus WINGDIPAPI GdipAddPathRectangle(GpPath *path, REAL x, REAL y,
if
(
!
path
)
return
InvalidParameter
;
if
(
width
<=
0
.
0
||
height
<=
0
.
0
)
return
Ok
;
/* make a backup copy of path data */
if
((
retstat
=
GdipClonePath
(
path
,
&
backup
))
!=
Ok
)
return
retstat
;
...
...
dlls/gdiplus/tests/graphicspath.c
View file @
0943fcf3
...
...
@@ -1301,6 +1301,7 @@ static void test_empty_rect(void)
{
GpPath
*
path
;
GpStatus
status
;
INT
count
;
BOOL
result
;
status
=
GdipCreatePath
(
FillModeAlternate
,
&
path
);
...
...
@@ -1309,6 +1310,10 @@ static void test_empty_rect(void)
status
=
GdipAddPathRectangle
(
path
,
0
.
0
,
0
.
0
,
-
5
.
0
,
5
.
0
);
expect
(
Ok
,
status
);
status
=
GdipGetPointCount
(
path
,
&
count
);
expect
(
Ok
,
status
);
expect
(
0
,
count
);
status
=
GdipIsVisiblePathPoint
(
path
,
-
2
.
0
,
2
.
0
,
NULL
,
&
result
);
expect
(
Ok
,
status
);
expect
(
FALSE
,
status
);
...
...
@@ -1316,12 +1321,31 @@ static void test_empty_rect(void)
status
=
GdipAddPathRectangle
(
path
,
0
.
0
,
0
.
0
,
5
.
0
,
-
5
.
0
);
expect
(
Ok
,
status
);
status
=
GdipGetPointCount
(
path
,
&
count
);
expect
(
Ok
,
status
);
expect
(
0
,
count
);
status
=
GdipAddPathRectangle
(
path
,
0
.
0
,
0
.
0
,
0
.
0
,
5
.
0
);
expect
(
Ok
,
status
);
status
=
GdipGetPointCount
(
path
,
&
count
);
expect
(
Ok
,
status
);
expect
(
0
,
count
);
status
=
GdipAddPathRectangle
(
path
,
0
.
0
,
0
.
0
,
5
.
0
,
0
.
0
);
expect
(
Ok
,
status
);
status
=
GdipGetPointCount
(
path
,
&
count
);
expect
(
Ok
,
status
);
expect
(
0
,
count
);
status
=
GdipAddPathRectangle
(
path
,
0
.
0
,
0
.
0
,
5
.
0
,
0
.
1
);
expect
(
Ok
,
status
);
status
=
GdipGetPointCount
(
path
,
&
count
);
expect
(
Ok
,
status
);
expect
(
4
,
count
);
GdipDeletePath
(
path
);
}
...
...
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