We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ad632a2 + 5203fdc commit 60f68dcCopy full SHA for 60f68dc
Src/UStrUtils.pas
@@ -404,7 +404,7 @@ function StrCompressWhiteSpace(const Str: UnicodeString): UnicodeString;
404
Inc(ResCount);
405
// Skip past any following white space
406
Inc(Idx);
407
- while TCharacter.IsWhiteSpace(Str[Idx]) do
+ while (Idx <= Length(Str)) and TCharacter.IsWhiteSpace(Str[Idx]) do
408
409
end
410
else
0 commit comments