* src/truetype/ttgload.c (TT_Load_Simple_Glyph): Handle zero-contour

glyphs correctly.  Patch from Savannah bug #23277.
This commit is contained in:
Werner Lemberg 2008-05-17 20:06:13 +00:00
parent a2f17cc150
commit 89d64fa6e3
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-05-17 Sam Hocevar <samh>
* src/truetype/ttgload.c (TT_Load_Simple_Glyph): Handle zero-contour
glyphs correctly. Patch from Savannah bug #23277.
2008-05-16 Werner Lemberg <wl@gnu.org>
* docs/CHANGES: Updated.

View File

@ -267,7 +267,11 @@
if ( n_contours >= 0xFFF || p + ( n_contours + 1 ) * 2 > limit )
goto Invalid_Outline;
cont[0] = prev_cont = FT_NEXT_USHORT( p );
prev_cont = FT_NEXT_USHORT( p );
if ( n_contours > 0 )
cont[0] = prev_cont;
for ( cont++; cont < cont_limit; cont++ )
{
cont[0] = FT_NEXT_USHORT( p );