diff options
author | Alex Richardson <Alexander.Richardson@cl.cam.ac.uk> | 2021-07-15 18:02:57 +0100 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2021-07-16 08:07:18 +0200 |
commit | c35961a92574f27ddd5cdcd1baaa6a7ae279491f (patch) | |
tree | 39eb4148720f96bc20516b89a5c1e04ba1cf61dc /tests | |
parent | 552fc97fe596d13551a380e9ea4a8c7ab27ad4f4 (diff) | |
download | freetype2-c35961a92574f27ddd5cdcd1baaa6a7ae279491f.tar.gz |
* tests/issue-1063/main.c (main): Fix uninitialized variable.
I tried running `meson test` but the test just crashed and gdb
reported that the face argument to `FT_Get_Char_Index` was nonsense.
With this change the test prints 'Could not open file: ' as it
should.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/issue-1063/main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/issue-1063/main.c b/tests/issue-1063/main.c index eac02642a..1bce0feb2 100644 --- a/tests/issue-1063/main.c +++ b/tests/issue-1063/main.c @@ -7,14 +7,13 @@ int main( void ) { FT_Library library; - FT_Face face; + FT_Face face = NULL; /* Assumes this is run from out/ build directory though 'meson test -C out' */ const char* filepath = "../tests/data/As.I.Lay.Dying.ttf"; FT_Init_FreeType( &library ); - FT_New_Face( library, filepath, 0, &face ); - if ( !face ) + if ( FT_New_Face( library, filepath, 0, &face ) != 0 ) { fprintf( stderr, "Could not open file: %s\n", filepath ); return 1; |