[directwrite] Use correct UTF-16 string length

Fixes https://github.com/harfbuzz/harfbuzz/issues/2474
This commit is contained in:
Khaled Hosny 2021-04-15 13:52:19 +02:00 committed by Behdad Esfahbod
parent 668acff1f0
commit e116058bba
1 changed files with 1 additions and 1 deletions

View File

@ -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;