From e116058bba1f5eb667d211c0c6c0be1bbffc6213 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Thu, 15 Apr 2021 13:52:19 +0200 Subject: [PATCH] [directwrite] Use correct UTF-16 string length Fixes https://github.com/harfbuzz/harfbuzz/issues/2474 --- src/hb-directwrite.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-directwrite.cc b/src/hb-directwrite.cc index a07302159..aebe9e054 100644 --- a/src/hb-directwrite.cc +++ b/src/hb-directwrite.cc @@ -623,7 +623,7 @@ _hb_directwrite_shape_full (hb_shape_plan_t *shape_plan, * but we never attempt to shape a word longer than 64K characters * in a single gfxShapedWord, so we cannot exceed that limit. */ - uint32_t textLength = buffer->len; + uint32_t textLength = chars_len; TextAnalysis analysis (textString, textLength, nullptr, readingDirection); TextAnalysis::Run *runHead;