mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 17:39:22 +02:00
don't try to access empty string members
git-svn-id: trunk@14369 -
This commit is contained in:
parent
ab8d3d88f9
commit
7234fee1f0
@ -1353,9 +1353,9 @@ begin
|
|||||||
Result:=copy(Result,1,StartPos-1)+NewPath+copy(Result,EndPos,length(Result));
|
Result:=copy(Result,1,StartPos-1)+NewPath+copy(Result,EndPos,length(Result));
|
||||||
EndPos:=StartPos+length(NewPath);
|
EndPos:=StartPos+length(NewPath);
|
||||||
end;
|
end;
|
||||||
// check if path already exists
|
// check if path already exists
|
||||||
if FindPathInSearchPath(@Result[StartPos],EndPos-StartPos,
|
if (Length(Result) > 0) and
|
||||||
@Result[1],StartPos-1)<>nil
|
(FindPathInSearchPath(@Result[StartPos],EndPos-StartPos, @Result[1],StartPos-1) <> nil)
|
||||||
then begin
|
then begin
|
||||||
// remove path
|
// remove path
|
||||||
System.Delete(Result,StartPos,EndPos-StartPos+1);
|
System.Delete(Result,StartPos,EndPos-StartPos+1);
|
||||||
|
Loading…
Reference in New Issue
Block a user