* patch for bug #8146 by Kris Leech

git-svn-id: trunk@10482 -
This commit is contained in:
marc 2007-01-20 02:38:28 +00:00
parent 466edbbd14
commit 285dbf5846

View File

@ -1360,7 +1360,7 @@ function TPascalReaderTool.FindMainBeginEndNode: TCodeTreeNode;
begin begin
Result:=Tree.Root; Result:=Tree.Root;
if (Result=nil) then exit; if (Result=nil) then exit;
if (Result.Desc=ctnProgram) then if (Result.Desc in [ctnProgram,ctnLibrary]) then
Result:=Result.LastChild Result:=Result.LastChild
else begin else begin
Result:=FindImplementationNode; Result:=FindImplementationNode;