Skip to content

Commit 60f68dc

Browse files
committed
Merge branch 'feature/95-ustrutils-bug' into develop
2 parents ad632a2 + 5203fdc commit 60f68dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Src/UStrUtils.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ function StrCompressWhiteSpace(const Str: UnicodeString): UnicodeString;
404404
Inc(ResCount);
405405
// Skip past any following white space
406406
Inc(Idx);
407-
while TCharacter.IsWhiteSpace(Str[Idx]) do
407+
while (Idx <= Length(Str)) and TCharacter.IsWhiteSpace(Str[Idx]) do
408408
Inc(Idx);
409409
end
410410
else

0 commit comments

Comments
 (0)