freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype][master] * tests/issue-1063/main.c (main): Fix u


From: Werner Lemberg (@wl)
Subject: [Git][freetype/freetype][master] * tests/issue-1063/main.c (main): Fix uninitialized variable.
Date: Fri, 16 Jul 2021 06:07:36 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType

Commits:

2 changed files:

Changes:

  • ChangeLog
    1
    +2021-07-15  Alex Richardson  <Alexander.Richardson@cl.cam.ac.uk>
    
    2
    +
    
    3
    +	* tests/issue-1063/main.c (main): Fix uninitialized variable.
    
    4
    +
    
    5
    +	I tried running `meson test` but the test just crashed and gdb
    
    6
    +	reported that the face argument to `FT_Get_Char_Index` was nonsense. 
    
    7
    +	With this change the test prints 'Could not open file: ' as it
    
    8
    +	should.
    
    9
    +
    
    1 10
     2021-07-16  Werner Lemberg  <wl@gnu.org>
    
    2 11
     
    
    3 12
     	[smooth] Minor fixes.
    

  • tests/issue-1063/main.c
    ... ... @@ -7,14 +7,13 @@ int
    7 7
     main( void )
    
    8 8
     {
    
    9 9
       FT_Library library;
    
    10
    -  FT_Face    face;
    
    10
    +  FT_Face    face = NULL;
    
    11 11
     
    
    12 12
       /* Assumes this is run from out/ build directory though 'meson test -C out' */
    
    13 13
       const char* filepath = "../tests/data/As.I.Lay.Dying.ttf";
    
    14 14
     
    
    15 15
       FT_Init_FreeType( &library );
    
    16
    -  FT_New_Face( library, filepath, 0, &face );
    
    17
    -  if ( !face )
    
    16
    +  if ( FT_New_Face( library, filepath, 0, &face ) != 0 )
    
    18 17
       {
    
    19 18
         fprintf( stderr, "Could not open file: %s\n", filepath );
    
    20 19
         return 1;
    


  • reply via email to

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