From bf2c3eb027064fcdeea6209511be32f98d8193f3 Mon Sep 17 00:00:00 2001 From: Muhammad Tayyab Akram Date: Thu, 30 Nov 2023 19:07:14 +0500 Subject: [PATCH] [lib] Fixed separator length not setting issue --- Source/SBAlgorithm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/SBAlgorithm.c b/Source/SBAlgorithm.c index 2a6fe50..56009d0 100644 --- a/Source/SBAlgorithm.c +++ b/Source/SBAlgorithm.c @@ -144,6 +144,10 @@ void SBAlgorithmGetParagraphBoundary(SBAlgorithmRef algorithm, SBUInteger limitIndex; SBUInteger startIndex; + if (separatorLength) { + *separatorLength = 0; + } + SBUIntegerNormalizeRange(codepointSequence->stringLength, ¶graphOffset, &suggestedLength); limitIndex = paragraphOffset + suggestedLength;