Werner Lemberg pushed to branch master at FreeType / FreeType
Commits:
-
c35961a9
by Alex Richardson at 2021-07-16T08:07:18+02:00
2 changed files:
Changes:
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.
|
... | ... | @@ -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;
|