Fix text wrapping bug that only happened under a specific scenario
was causing a broken string view if there was a line that had any space in it followed by a forced newline and then a line that had no spaces but was long enough to wrap. example: A B\nThisLastLineHasNoSpacesButIsLongEnoughToWrapAnyways!!!!!!!!!!!!
This commit is contained in:
parent
227e60ca4c
commit
37d7262375
@ -174,6 +174,7 @@ bool TextPainter::processWrapText(StringView text, unsigned* wrapWidth, WrapText
|
|||||||
++lineStartIt;
|
++lineStartIt;
|
||||||
// next line starts after the CR with no characters in it and no known splits.
|
// next line starts after the CR with no characters in it and no known splits.
|
||||||
lineCharSize = linePixelWidth = 0;
|
lineCharSize = linePixelWidth = 0;
|
||||||
|
splitIt = end;
|
||||||
} else {
|
} else {
|
||||||
int charWidth = glyphWidth(character);
|
int charWidth = glyphWidth(character);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user