From acdf1ed1aae42a7fbe2ccc9c482abec87afb2f11 Mon Sep 17 00:00:00 2001 From: MarcinZiabek Date: Wed, 25 May 2022 00:21:14 +0200 Subject: [PATCH] Stability improvement --- QuestPDF/Elements/Text/Items/TextBlockSpan.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QuestPDF/Elements/Text/Items/TextBlockSpan.cs b/QuestPDF/Elements/Text/Items/TextBlockSpan.cs index 3ea667f..1091bdd 100644 --- a/QuestPDF/Elements/Text/Items/TextBlockSpan.cs +++ b/QuestPDF/Elements/Text/Items/TextBlockSpan.cs @@ -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