Closed delphidabbler closed 1 year ago
This unit can generated an out of bounds error when following white space is at the end of a string. The Idx index can go beyond the end of the string.
Idx
The bug is in the line:
https://github.com/delphidabbler/codesnip/blob/02656b8417c2863a89cf2bf45e3be275ca9f94a9/Src/UStrUtils.pas#L407
A fix is to change the above line to:
while (Idx <= Length(Str)) and TCharacter.IsWhiteSpace(Str[Idx]) do
Fixed at merge commit 60f68dc8f0ac5f18791d52bd09c221b134463b9d
This unit can generated an out of bounds error when following white space is at the end of a string. The
Idx
index can go beyond the end of the string.The bug is in the line:
https://github.com/delphidabbler/codesnip/blob/02656b8417c2863a89cf2bf45e3be275ca9f94a9/Src/UStrUtils.pas#L407
A fix is to change the above line to: