codetools: fixed GetIdentStartEndAtPosition if pos behind source

git-svn-id: trunk@56197 -
This commit is contained in:
mattias 2017-10-25 20:19:02 +00:00
parent 444f0dd6f1
commit a64605ceec

View File

@ -1828,7 +1828,7 @@ begin
inc(IdentStart);
if (IdentStart>1) and (Source[IdentStart-1]='&') then
dec(IdentStart);
if not IsIdentStartChar[Source[IdentStart]] then
if (IdentStart>length(Source)) or not IsIdentStartChar[Source[IdentStart]] then
IdentEnd:=IdentStart;
end;