Skip to content

Commit

Permalink
add range check to AutoFoldComments finder
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed Apr 18, 2023
1 parent ccd7999 commit a8e6d41
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions econtrol/ec_syntanal.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2622,6 +2622,12 @@ procedure TecParserResults.FindCommentRangeBeforeToken(
Dec(NLineFrom);
Dec(NLineOld);

if NLineFrom<0 then
begin
Inc(NLineFrom);
Break;
end;

//found empty line (without tokens)
if TokenIndexer[NLineFrom]<0 then
begin
Expand Down

0 comments on commit a8e6d41

Please sign in to comment.