[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master c35961a: * tests/issue-1063/main.c (main): Fix uninit
From: |
Werner Lemberg |
Subject: |
[freetype2] master c35961a: * tests/issue-1063/main.c (main): Fix uninitialized variable. |
Date: |
Fri, 16 Jul 2021 02:07:39 -0400 (EDT) |
branch: master
commit c35961a92574f27ddd5cdcd1baaa6a7ae279491f
Author: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Commit: Werner Lemberg <wl@gnu.org>
* 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.
---
ChangeLog | 9 +++++++++
tests/issue-1063/main.c | 5 ++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index de666fa..520d3cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2021-07-15 Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
+
+ * 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.
+
2021-07-16 Werner Lemberg <wl@gnu.org>
[smooth] Minor fixes.
diff --git a/tests/issue-1063/main.c b/tests/issue-1063/main.c
index eac0264..1bce0fe 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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master c35961a: * tests/issue-1063/main.c (main): Fix uninitialized variable.,
Werner Lemberg <=