mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-04 02:37:15 +01:00
codetools: FindNextComment: fixed if MaxPos<1
git-svn-id: trunk@33016 -
This commit is contained in:
parent
7d0dab7439
commit
f72478261a
@ -1183,7 +1183,11 @@ begin
|
||||
end;
|
||||
inc(Result);
|
||||
end;
|
||||
if Result>=MaxPos+1 then Result:=NotFoundPos;
|
||||
if Result>MaxPos then
|
||||
if NotFoundPos>=1 then
|
||||
Result:=NotFoundPos
|
||||
else
|
||||
Result:=MaxPos+1;
|
||||
end;
|
||||
|
||||
procedure FindCommentsInRange(const Src: string; StartPos, EndPos: integer;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user