diff options
author | Alexei Podtelezhnikov <apodtele@gmail.com> | 2018-11-08 21:04:56 -0500 |
---|---|---|
committer | Alexei Podtelezhnikov <apodtele@gmail.com> | 2018-11-08 21:04:56 -0500 |
commit | 181033d396acac847e1dbcb766a1df8e5dc9d711 (patch) | |
tree | c0ce9f16fa35f6e01b6ab017aca3c69a919683ec | |
parent | 81c31f62cb30bb5526ffa3f19fb06b14ca593b00 (diff) | |
download | freetype2-181033d396acac847e1dbcb766a1df8e5dc9d711.tar.gz |
[ftstroke] Fix unpredictable failures (#54986).
* src/base/ftstroke.c (ft_sroke_border_lineto): Fix lineto check.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/base/ftstroke.c | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -1,5 +1,11 @@ 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). * src/base/ftstroke.c (ft_sroke_border_close): Set the start tags. diff --git a/src/base/ftstroke.c b/src/base/ftstroke.c index 8a9e7db30..fd74f8c19 100644 --- a/src/base/ftstroke.c +++ b/src/base/ftstroke.c @@ -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; |