Commit 4e38576a973b93e369a94de3f294ae440aea00df

David Turner 2000-09-19T19:44:42

fixed a bug that happened when rendering spaces in monochrome mode.. actually, when outline.num_points == 0, it is legal to have outline.points == 0 too. The code did return a FT_Err_Invalid_Outline error incorrectly then because the checks were not performed in the correct order

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/raster1/ftraster.c b/src/raster1/ftraster.c
index 94b204c..2f300c4 100644
--- a/src/raster1/ftraster.c
+++ b/src/raster1/ftraster.c
@@ -3255,13 +3255,13 @@
     if ( !raster || !raster->buff || !raster->sizeBuff )
       return Raster_Err_Not_Ini;
 
-    if ( !outline || !outline->contours || !outline->points )
-      return Raster_Err_Invalid;
-
     /* return immediately if the outline is empty */
     if ( outline->n_points == 0 || outline->n_contours <= 0 )
       return Raster_Err_None;
 
+    if ( !outline || !outline->contours || !outline->points )
+      return Raster_Err_Invalid;
+
     if ( outline->n_points != outline->contours[outline->n_contours - 1] + 1 )
       return Raster_Err_Invalid;