Fix caret_count value when AAT is disabled
authorEbrahim Byagowi <ebrahim@gnu.org>
Wed, 14 Aug 2019 10:04:55 +0000 (14:34 +0430)
committerEbrahim Byagowi <ebrahim@gnu.org>
Wed, 14 Aug 2019 13:28:30 +0000 (17:58 +0430)
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

index d95e5a0..72d65c9 100644 (file)
@@ -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