mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 20:28:19 +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));
|
||||
EndPos:=StartPos+length(NewPath);
|
||||
end;
|
||||
// check if path already exists
|
||||
if FindPathInSearchPath(@Result[StartPos],EndPos-StartPos,
|
||||
@Result[1],StartPos-1)<>nil
|
||||
// check if path already exists
|
||||
if (Length(Result) > 0) and
|
||||
(FindPathInSearchPath(@Result[StartPos],EndPos-StartPos, @Result[1],StartPos-1) <> nil)
|
||||
then begin
|
||||
// remove path
|
||||
System.Delete(Result,StartPos,EndPos-StartPos+1);
|
||||
|
Loading…
Reference in New Issue
Block a user