freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype][master] [sfnt] Fix fallout from 2021-05-29 chan


From: Werner Lemberg (@wl)
Subject: [Git][freetype/freetype][master] [sfnt] Fix fallout from 2021-05-29 change.
Date: Wed, 02 Jun 2021 05:20:37 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

2 changed files:

Changes:

  • ChangeLog
    1
    +2021-06-02  Ben Wagner  <bungeman@chromium.org>
    
    2
    +	    Werner Lemberg  <wl@gnu.org>
    
    3
    +
    
    4
    +	[sfnt] Fix fallout from 2021-05-29 change.
    
    5
    +
    
    6
    +	* src/sfnt/ttcolr.c (find_base_glyph_record,
    
    7
    +	find_base_glyph_v1_record): Adjust binary search.
    
    8
    +
    
    9
    +	Needs to be updated with change to unsigned.
    
    10
    +
    
    1 11
     2021-06-02  Werner Lemberg  <wl@gnu.org>
    
    2 12
     
    
    3 13
     	* src/autofit/aflatin.c (af_latin_metrics_scale_dim): Fix tracing.
    

  • src/sfnt/ttcolr.c
    ... ... @@ -233,10 +233,10 @@
    233 233
                               BaseGlyphRecord*  record )
    
    234 234
       {
    
    235 235
         FT_UInt  min = 0;
    
    236
    -    FT_UInt  max = num_base_glyph - 1;
    
    236
    +    FT_UInt  max = num_base_glyph;
    
    237 237
     
    
    238 238
     
    
    239
    -    while ( min <= max )
    
    239
    +    while ( min < max )
    
    240 240
         {
    
    241 241
           FT_UInt   mid = min + ( max - min ) / 2;
    
    242 242
           FT_Byte*  p   = base_glyph_begin + mid * BASE_GLYPH_SIZE;
    
    ... ... @@ -247,7 +247,7 @@
    247 247
           if ( gid < glyph_id )
    
    248 248
             min = mid + 1;
    
    249 249
           else if (gid > glyph_id )
    
    250
    -        max = mid - 1;
    
    250
    +        max = mid;
    
    251 251
           else
    
    252 252
           {
    
    253 253
             record->gid               = gid;
    
    ... ... @@ -590,16 +590,16 @@
    590 590
     
    
    591 591
     
    
    592 592
       static FT_Bool
    
    593
    -  find_base_glyph_v1_record ( FT_Byte *           base_glyph_begin,
    
    594
    -                              FT_UInt             num_base_glyph,
    
    595
    -                              FT_UInt             glyph_id,
    
    596
    -                              BaseGlyphV1Record  *record )
    
    593
    +  find_base_glyph_v1_record( FT_Byte *           base_glyph_begin,
    
    594
    +                             FT_UInt             num_base_glyph,
    
    595
    +                             FT_UInt             glyph_id,
    
    596
    +                             BaseGlyphV1Record  *record )
    
    597 597
       {
    
    598 598
         FT_UInt  min = 0;
    
    599
    -    FT_UInt  max = num_base_glyph - 1;
    
    599
    +    FT_UInt  max = num_base_glyph;
    
    600 600
     
    
    601 601
     
    
    602
    -    while ( min <= max )
    
    602
    +    while ( min < max )
    
    603 603
         {
    
    604 604
           FT_UInt  mid = min + ( max - min ) / 2;
    
    605 605
     
    
    ... ... @@ -616,7 +616,7 @@
    616 616
           if ( gid < glyph_id )
    
    617 617
             min = mid + 1;
    
    618 618
           else if (gid > glyph_id )
    
    619
    -        max = mid - 1;
    
    619
    +        max = mid;
    
    620 620
           else
    
    621 621
           {
    
    622 622
             record->gid          = gid;
    


  • reply via email to

    [Prev in Thread] Current Thread [Next in Thread]