Fix infinite-join test case (bug #8379)

The trick for this was to carefully ensure that the pen always has
at least 4 vertices. There was a previous attempt at this in the
code already but the test case had a combination of matrix and radius
that resulted in a value that was just able to sneak past the previous
check.
This commit is contained in:
Carl Worth 2006-09-21 15:17:59 -07:00
parent 5b7a7f39ad
commit 10cd23d51f

View file

@ -270,7 +270,12 @@ _cairo_pen_vertices_needed (double tolerance,
/* number of vertices must be even */
if (num_vertices % 2)
num_vertices++;
/* And we must always have at least 4 vertices. */
if (num_vertices < 4)
num_vertices = 4;
}
return num_vertices;
}