From 3ae44645d60fe8271ad18b004434d475eaeb7ad6 Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Wed, 14 Aug 2019 14:34:55 +0430 Subject: [PATCH] Fix caret_count value when AAT is disabled Set caret_count to zero as that is what we want to happen inside lcar when there is no result. --- src/hb-ot-layout.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/hb-ot-layout.cc b/src/hb-ot-layout.cc index d95e5a0b..72d65c95 100644 --- a/src/hb-ot-layout.cc +++ b/src/hb-ot-layout.cc @@ -375,10 +375,14 @@ hb_ot_layout_get_ligature_carets (hb_font_t *font, { if (caret_count) *caret_count = result_caret_count; } -#ifndef HB_NO_AAT else + { +#ifndef HB_NO_AAT result = font->face->table.lcar->get_lig_carets (font, direction, glyph, start_offset, caret_count, caret_array); +#else + if (caret_count) *caret_count = 0; #endif + } return result; } #endif -- GitLab