Stability improvement

This commit is contained in:
MarcinZiabek
2022-05-25 00:21:14 +02:00
parent a0b32e5ecf
commit acdf1ed1aa
@@ -101,7 +101,7 @@ namespace QuestPDF.Elements.Text.Items
// textLength - length of the part of the text that fits in available width (creating a line)
// entire text fits, no need to wrap
if (endIndex == TextShapingResult.Glyphs.Length - 1)
if (endIndex == 0 || endIndex == TextShapingResult.Glyphs.Length - 1)
return (endIndex, endIndex);
// breaking anywhere