Fix Savannah bug #41320. * src/autofit/aflatin.c (af_latin_metrics_init_blues) <AF_LATIN_IS_LONG_BLUE>: Avoid negative index of `last'.
diff --git a/ChangeLog b/ChangeLog
index 1864f50..918e86c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-01-24 Werner Lemberg <wl@gnu.org>
+
+ Fix Savannah bug #41320.
+
+ * src/autofit/aflatin.c (af_latin_metrics_init_blues)
+ <AF_LATIN_IS_LONG_BLUE>: Avoid negative index of `last'.
+
2014-01-23 Werner Lemberg <wl@gnu.org>
Fix Savannah bug #41310.
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index bb002c1..8dac220 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -592,7 +592,10 @@
if ( FT_ABS( points[next].x - points[first].x ) <=
20 * dist )
{
- last--;
+ if ( last > best_contour_first )
+ last--;
+ else
+ last = best_contour_last;
break;
}