[pango/wip/baedert/for-master: 48/53] pango-ot-info: Fix an uninitialized value
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/wip/baedert/for-master: 48/53] pango-ot-info: Fix an uninitialized value
- Date: Wed, 10 Jun 2020 04:13:00 +0000 (UTC)
commit 560b9b575792e1aa4faca4a0c159baa96b4a04e5
Author: Timm Bäder <mail baedert org>
Date: Wed Jun 10 05:31:36 2020 +0200
pango-ot-info: Fix an uninitialized value
We never assign a value to l_index. Also, we pass on language_index to
hb_ot_layout_script_select_language, even though the last parameter of
that function is not nullable, while our language_index parameter is.
Fix this to pass &l_index to hb_ot_layout_script_select_language, which
is what I believe should happen.
pango/pango-ot-info.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/pango/pango-ot-info.c b/pango/pango-ot-info.c
index f995c1d4..2b1b61f4 100644
--- a/pango/pango-ot-info.c
+++ b/pango/pango-ot-info.c
@@ -184,7 +184,7 @@ pango_ot_info_find_language (PangoOTInfo *info,
guint *required_feature_index)
{
gboolean ret;
- unsigned l_index;
+ guint l_index;
hb_tag_t tt = get_hb_table_type (table_type);
ret = hb_ot_layout_script_select_language (info->hb_face,
@@ -192,8 +192,9 @@ pango_ot_info_find_language (PangoOTInfo *info,
script_index,
1,
&language_tag,
- language_index);
- if (language_index) *language_index = l_index;
+ &l_index);
+ if (language_index)
+ *language_index = l_index;
hb_ot_layout_language_get_required_feature_index (info->hb_face, tt,
script_index,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]