text-rendering-tests
text-rendering-tests copied to clipboard
Crash in Tehreer stack on '\n' character
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);