codetools: FindNextComment: fixed if MaxPos<1

git-svn-id: trunk@33016 -
This commit is contained in:
mattias 2011-10-22 10:13:33 +00:00
parent 7d0dab7439
commit f72478261a

View File

@ -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;