From b143e34ee1bb56d104e33b78abff70302a93d3d0 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Thu, 26 Mar 2020 11:58:45 +0430 Subject: [PATCH] [gsubgpos] Initialize variation index on HB_NO_VAR hb_shape_plan_key_t::equal expects hb_ot_shape_plan_key_t be initialized by hb_ot_layout_table_find_feature_variations calls but it won't get initialized when HB_NO_VAR build config is used. Related to https://github.com/harfbuzz/harfbuzz/issues/2280 --- src/hb-ot-layout-gsubgpos.hh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index 6487cb7ba..15a43b2d6 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -3054,6 +3054,7 @@ struct GSUBGPOS unsigned int *index) const { #ifdef HB_NO_VAR + *index = NOT_FOUND_INDEX; return false; #endif return (version.to_int () >= 0x00010001u ? this+featureVars : Null (FeatureVariations))