* Small fix from Andrey to improve link resolving

git-svn-id: trunk@48441 -
(cherry picked from commit 89149a2f9f)
This commit is contained in:
michael 2021-01-28 07:01:38 +00:00 committed by Florian Klämpfl
parent c3cd59d03f
commit 9d8955d25c

View File

@ -1067,7 +1067,7 @@ function TLongNameFileAllocator.GetFilename(AElement: TPasElement; ASubindex: In
var
n,s: String;
i: Integer;
MElement: TPasElement;
begin
Result:='';
if AElement.ClassType = TPasPackage then
@ -1105,7 +1105,9 @@ begin
end else
Result := LowerCase(AElement.PathName);
// cut off Package Name
AElement:= AElement.GetModule;
MElement:= AElement.GetModule;
if Assigned(MElement) then
AElement:= MElement;
Result := Copy(Result, Length(AElement.Parent.Name) + 2, MaxInt);
// to skip dots in unit name
i := Length(AElement.Name);