diff --git a/ChangeLog b/ChangeLog index 77e825baa..7546c26c7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,14 +20,15 @@ The previous fix for #46372 misunderstood a composite glyph referring same component twice as a recursive reference. See the discussion - http://lists.gnu.org/archive/html/freetype/2016-05/msg00000.html + http://lists.gnu.org/archive/html/freetype/2016-05/msg00000.html Thanks to Khaled Hosny for finding this issue. * src/truetype/ttgload.c (ft_list_get_node_at): A function to get - the i-th node from FT_List. (load_truetype_glyph): In the traversal - scan of the reference tree in the composite glyph, we clear the - nodes filled by previous sibling chain. + the i-th node from FT_List. + (load_truetype_glyph): In the traversal scan of the reference tree + in the composite glyph, we clear the nodes filled by previous + sibling chain. 2016-05-07 Werner Lemberg diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c index 7a3483817..90828eaf3 100644 --- a/src/truetype/ttgload.c +++ b/src/truetype/ttgload.c @@ -1385,7 +1385,7 @@ if ( !index ) return cur; - index --; + index--; } return NULL; @@ -1663,6 +1663,7 @@ FT_UInt start_point; FT_UInt start_contour; FT_ULong ins_pos; /* position of composite instructions, if any */ + FT_ListNode node, node2; @@ -1676,10 +1677,9 @@ /* clear the nodes filled by sibling chains */ node = ft_list_get_node_at( &loader->composites, recurse_count ); - for ( node2 = node ; node2 ; node2 = node2->next ) + for ( node2 = node; node2; node2 = node2->next ) node2->data = (void*)ULONG_MAX; - /* check whether we already have a composite glyph with this index */ if ( FT_List_Find( &loader->composites, (void*)(unsigned long)glyph_index ) ) @@ -1689,10 +1689,10 @@ error = FT_THROW( Invalid_Composite ); goto Exit; } + else if ( node ) - { node->data = (void*)(unsigned long)glyph_index; - } + else { if ( FT_NEW( node ) )