mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-05 10:40:25 +02:00
codetools: fixed ForEachIdentifierInCleanSrc check if StartPos<1
git-svn-id: trunk@42728 -
This commit is contained in:
parent
d442a420b7
commit
cc5d712837
@ -1724,6 +1724,8 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
//debugln(['TPascalReaderTool.ForEachIdentifierInCleanSrc Node=',Node.DescAsString,' "',dbgstr(Src,StartPos,EndPos-StartPos),'"']);
|
//debugln(['TPascalReaderTool.ForEachIdentifierInCleanSrc Node=',Node.DescAsString,' "',dbgstr(Src,StartPos,EndPos-StartPos),'"']);
|
||||||
|
if (StartPos<1) then
|
||||||
|
StartPos:=1;
|
||||||
if StartPos>SrcLen then exit;
|
if StartPos>SrcLen then exit;
|
||||||
if EndPos>SrcLen then EndPos:=SrcLen+1;
|
if EndPos>SrcLen then EndPos:=SrcLen+1;
|
||||||
if StartPos>=EndPos then exit;
|
if StartPos>=EndPos then exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user