text-rendering-tests icon indicating copy to clipboard operation
text-rendering-tests copied to clipboard

Crash in Tehreer stack on '\n' character

Open heybdj opened this issue 3 years ago • 0 comments

Given the input string "A\nB", the Tehreer stack will crash when creating the second line of the run. The fix is to pass the paragraph starting offset to SBParagraphCreateLine(...) here:

https://github.com/unicode-org/text-rendering-tests/blob/f9535a12551d2fb25d8288547692271ebef38c35/src/fonttest/tehreerstack_line.cpp#L152

The fix should look like this:

SBLineRef line = SBParagraphCreateLine(paragraph, paraStart, paraLen);

heybdj avatar Apr 08 '22 19:04 heybdj