codetools: fixed ForEachIdentifierInCleanSrc check if StartPos<1

git-svn-id: trunk@42728 -
This commit is contained in:
mattias 2013-09-10 20:16:55 +00:00
parent d442a420b7
commit cc5d712837

View File

@ -1724,6 +1724,8 @@ var
begin
//debugln(['TPascalReaderTool.ForEachIdentifierInCleanSrc Node=',Node.DescAsString,' "',dbgstr(Src,StartPos,EndPos-StartPos),'"']);
if (StartPos<1) then
StartPos:=1;
if StartPos>SrcLen then exit;
if EndPos>SrcLen then EndPos:=SrcLen+1;
if StartPos>=EndPos then exit;