Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-04-15 11:10:33 +1000
committerKae <80987908+Novaenia@users.noreply.github.com>2024-04-15 11:10:33 +1000
commit37d72623759ecb36e738e5f6853293a8f021d628 (patch)
tree32228514baaf5ea87090c065485014f1a81ecc21 /source
parent227e60ca4c927ed9f6b7db5e5c53c45addd1428b (diff)
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!!!!!!!!!!!!
Diffstat (limited to 'source')
-rw-r--r--source/rendering/StarTextPainter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/rendering/StarTextPainter.cpp b/source/rendering/StarTextPainter.cpp
index 9891ad6..8e21488 100644
--- a/source/rendering/StarTextPainter.cpp
+++ b/source/rendering/StarTextPainter.cpp
@@ -174,6 +174,7 @@ bool TextPainter::processWrapText(StringView text, unsigned* wrapWidth, WrapText
++lineStartIt;
// next line starts after the CR with no characters in it and no known splits.
lineCharSize = linePixelWidth = 0;
+ splitIt = end;
} else {
int charWidth = glyphWidth(character);