[ftstroke] Fix unpredictable failures (#54986).

* src/base/ftstroke.c (ft_sroke_border_lineto): Fix lineto check.
This commit is contained in:
Alexei Podtelezhnikov 2018-11-08 21:04:56 -05:00
parent 81c31f62cb
commit 181033d396
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com>
[ftstroke] Fix unpredictable failures (#54986).
* src/base/ftstroke.c (ft_sroke_border_lineto): Fix lineto check.
2018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com>
[ftstroke] Fix unpredictable failures (#54976).

View File

@ -432,8 +432,8 @@
}
else
{
/* don't add zero-length lineto */
if ( border->num_points > 0 &&
/* don't add zero-length lineto, but always add moveto */
if ( border->num_points > (FT_UInt)border->start &&
FT_IS_SMALL( border->points[border->num_points - 1].x - to->x ) &&
FT_IS_SMALL( border->points[border->num_points - 1].y - to->y ) )
return error;