shithub: freetype+ttf2subf

Download patch

ref: 181033d396acac847e1dbcb766a1df8e5dc9d711
parent: 81c31f62cb30bb5526ffa3f19fb06b14ca593b00
author: Alexei Podtelezhnikov <[email protected]>
date: Thu Nov 8 16:04:56 EST 2018

[ftstroke] Fix unpredictable failures (#54986).

* src/base/ftstroke.c (ft_sroke_border_lineto): Fix lineto check.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2018-11-08  Alexei Podtelezhnikov  <[email protected]>
 
+	[ftstroke] Fix unpredictable failures (#54986).
+
+	* src/base/ftstroke.c (ft_sroke_border_lineto): Fix lineto check.
+
+2018-11-08  Alexei Podtelezhnikov  <[email protected]>
+
 	[ftstroke] Fix unpredictable failures (#54976).
 
 	* src/base/ftstroke.c (ft_sroke_border_close): Set the start tags.
--- 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;