mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-15 22:20:44 +01:00
codehelp: dont try to access string at positions > it length (0010887)
git-svn-id: trunk@14296 -
This commit is contained in:
parent
f181308801
commit
59f40cb1af
@ -512,7 +512,7 @@ begin
|
||||
or (CompareIdentifiers(@Result[StartPos+1],'p')=0) then
|
||||
begin
|
||||
// add new line
|
||||
if not (Result[EndPos] in [#10,#13]) then
|
||||
if (EndPos <= Length(Result)) and not (Result[EndPos] in [#10,#13]) then
|
||||
Result:=copy(Result,1,EndPos-1)+LineEnding+copy(Result,EndPos,length(Result));
|
||||
end;
|
||||
StartPos:=EndPos;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user