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
This commit is contained in:
David Turner 2000-09-19 19:44:42 +00:00
parent 5483e69cd8
commit 674826fa81
1 changed files with 3 additions and 3 deletions

View File

@ -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;