diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2021-12-03 04:03:12 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2021-12-03 04:03:12 +0000 |
commit | 4ee9d04bd5d518e5f1f86875f4f8184fc0552f44 (patch) | |
tree | 4f27c2cc7196ba469bf631ffe0460cb3d6bcbc9d /Build/source/libs/freetype2/freetype-src/src/pshinter/pshrec.c | |
parent | 39bd39ea6f91fb51d118264f372905de9accc347 (diff) |
freetype 2.11.1
git-svn-id: svn://tug.org/texlive/trunk@61211 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/freetype2/freetype-src/src/pshinter/pshrec.c')
-rw-r--r-- | Build/source/libs/freetype2/freetype-src/src/pshinter/pshrec.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/Build/source/libs/freetype2/freetype-src/src/pshinter/pshrec.c b/Build/source/libs/freetype2/freetype-src/src/pshinter/pshrec.c index a108734d49d..1faabdaafa6 100644 --- a/Build/source/libs/freetype2/freetype-src/src/pshinter/pshrec.c +++ b/Build/source/libs/freetype2/freetype-src/src/pshinter/pshrec.c @@ -499,23 +499,18 @@ ps_mask_table_merge_all( PS_Mask_Table table, FT_Memory memory ) { - FT_Int index1, index2; + FT_UInt index1, index2; FT_Error error = FT_Err_Ok; - /* both loops go down to 0, thus FT_Int for index1 and index2 */ - for ( index1 = (FT_Int)table->num_masks - 1; index1 > 0; index1-- ) + /* the loops stop when unsigned indices wrap around after 0 */ + for ( index1 = table->num_masks - 1; index1 < table->num_masks; index1-- ) { - for ( index2 = index1 - 1; index2 >= 0; index2-- ) + for ( index2 = index1 - 1; index2 < index1; index2-- ) { - if ( ps_mask_table_test_intersect( table, - (FT_UInt)index1, - (FT_UInt)index2 ) ) + if ( ps_mask_table_test_intersect( table, index1, index2 ) ) { - error = ps_mask_table_merge( table, - (FT_UInt)index2, - (FT_UInt)index1, - memory ); + error = ps_mask_table_merge( table, index2, index1, memory ); if ( error ) goto Exit; |