[truetype] Remove redundant check.

* src/truetype/ttgload.c (TT_Load_Simple_Glyph): Remove reduntant
second check for ordered contour start points.
This commit is contained in:
Werner Lemberg 2012-02-29 17:29:07 +01:00
parent 9eacbb81bd
commit 9290fa9022
2 changed files with 11 additions and 10 deletions

View File

@ -1,3 +1,10 @@
2012-02-29 Werner Lemberg <wl@gnu.org>
[truetype] Remove redundant check.
* src/truetype/ttgload.c (TT_Load_Simple_Glyph): Remove reduntant
second check for ordered contour start points.
2012-02-29 Werner Lemberg <wl@gnu.org>
[truetype] Make SHC instruction behave similar to MS rasterizer.

View File

@ -4,7 +4,7 @@
/* */
/* TrueType Glyph Loader (body). */
/* */
/* Copyright 1996-2011 */
/* Copyright 1996-2012 */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -373,8 +373,7 @@
if ( cont[0] <= prev_cont )
{
/* unordered contours: this is invalid */
error = TT_Err_Invalid_Table;
goto Fail;
goto Invalid_Outline;
}
prev_cont = cont[0];
}
@ -392,13 +391,6 @@
if ( error )
goto Fail;
/* we'd better check the contours table right now */
outline = &gloader->current.outline;
for ( cont = outline->contours + 1; cont < cont_limit; cont++ )
if ( cont[-1] >= cont[0] )
goto Invalid_Outline;
/* reading the bytecode instructions */
load->glyph->control_len = 0;
load->glyph->control_data = 0;
@ -439,6 +431,8 @@
p += n_ins;
outline = &gloader->current.outline;
/* reading the point tags */
flag = (FT_Byte*)outline->tags;
flag_limit = flag + n_points;