Fix Savannah bug #44412 (part 1). * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
diff --git a/ChangeLog b/ChangeLog
index c9d5ece..6b7b963 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-10 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ Fix Savannah bug #44412 (part 1).
+
+ * src/base/ftstroke.c (ft_stroker_inside): Handle near U-turns.
+
2015-03-10 Werner Lemberg <wl@gnu.org>
[base] Rename `FT_Bitmap_New' to `FT_Bitmap_Init'.
diff --git a/src/base/ftstroke.c b/src/base/ftstroke.c
index 434d0d8..842ee30 100644
--- a/src/base/ftstroke.c
+++ b/src/base/ftstroke.c
@@ -999,7 +999,9 @@
/* Only intersect borders if between two lineto's and both */
/* lines are long enough (line_length is zero for curves). */
- if ( !border->movable || line_length == 0 )
+ /* Also avoid U-turns of nearly 180 degree. */
+ if ( !border->movable || line_length == 0 ||
+ theta > 0x59C000 || theta < -0x59C000 )
intersect = FALSE;
else
{