gdiplus: Avoid division by zero in SOFTWARE_GdipDrawThinPath.

Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Fabian Maurer 2017-07-25 00:50:09 +02:00 committed by Alexandre Julliard
parent 3c7415f715
commit 400cfb0fd9
1 changed files with 3 additions and 0 deletions

View File

@ -3615,6 +3615,9 @@ static GpStatus SOFTWARE_GdipDrawThinPath(GpGraphics *graphics, GpPen *pen, GpPa
end_pointi.X = floorf(end_point.X);
end_pointi.Y = floorf(end_point.Y);
if(start_pointi.X == end_pointi.X && start_pointi.Y == end_pointi.Y)
continue;
/* draw line segment */
if (abs(start_pointi.Y - end_pointi.Y) > abs(start_pointi.X - end_pointi.X))
{