Commit 9a7951d99b056957ba002a4e20ba7057d64faff5

Werner Lemberg 2013-07-16T15:25:24

[smooth] Fix segfault caused by previous commit. * src/smooth/ftgrays.c (gray_set_cell): Always compute `ras.invalid'.

diff --git a/ChangeLog b/ChangeLog
index d167937..bf47171 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-07-16  Werner Lemberg  <wl@gnu.org>
+
+	[smooth] Fix segfault caused by previous commit.
+
+	* src/smooth/ftgrays.c (gray_set_cell): Always compute
+	`ras.invalid'.
+
 2013-07-16  David Turner  <digit@google.com>
 
 	[smooth] Improve performance.
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index ab76829..5262da5 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -310,7 +310,7 @@ typedef ptrdiff_t  FT_PtrDist;
 #endif
 
 
-  /* Compute `divident / divisor' and return both its quotient and     */
+  /* Compute `dividend / divisor' and return both its quotient and     */
   /* remainder, cast to a specific type.  This macro also ensures that */
   /* the remainder is always positive.                                 */
 #define FT_DIV_MOD( type, dividend, divisor, quotient, remainder ) \
@@ -633,10 +633,10 @@ typedef ptrdiff_t  FT_PtrDist;
       ras.cover = 0;
       ras.ex    = ex;
       ras.ey    = ey;
-
-      ras.invalid = ( (unsigned)ey >= (unsigned)ras.count_ey ||
-                                ex >= ras.count_ex           );
     }
+
+    ras.invalid = ( (unsigned)ey >= (unsigned)ras.count_ey ||
+                              ex >= ras.count_ex           );
   }