freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] * src/sfnt/ttload.c (tt_face_load_name)


From: Alexei Podtelezhnikov (@apodtele)
Subject: [Git][freetype/freetype][master] * src/sfnt/ttload.c (tt_face_load_name): Accounting fix.
Date: Sun, 17 Oct 2021 00:31:36 +0000

Alexei Podtelezhnikov pushed to branch master at FreeType / FreeType

Commits:

1 changed file:

Changes:

  • src/sfnt/ttload.c
    ... ... @@ -956,6 +956,7 @@
    956 956
         {
    
    957 957
           TT_Name  entry = table->names;
    
    958 958
           FT_UInt  count = table->numNameRecords;
    
    959
    +      FT_UInt  valid = 0;
    
    959 960
     
    
    960 961
     
    
    961 962
           for ( ; count > 0; count-- )
    
    ... ... @@ -991,15 +992,15 @@
    991 992
             /* mark the string as not yet converted */
    
    992 993
             entry->string = NULL;
    
    993 994
     
    
    995
    +        valid++;
    
    994 996
             entry++;
    
    995 997
           }
    
    996 998
     
    
    997 999
           /* reduce array size to the actually used elements */
    
    998
    -      count = (FT_UInt)( entry - table->names );
    
    999 1000
           FT_MEM_QRENEW_ARRAY( table->names,
    
    1000 1001
                                table->numNameRecords,
    
    1001
    -                           count );
    
    1002
    -      table->numNameRecords = count;
    
    1002
    +                           valid );
    
    1003
    +      table->numNameRecords = valid;
    
    1003 1004
         }
    
    1004 1005
     
    
    1005 1006
         FT_FRAME_EXIT();
    


  • reply via email to

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