summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2>2019-10-23 10:39:49 +0000
committerpierre <pierre@3ad0048d-3df7-0310-abae-a5850022a9f2>2019-10-23 10:39:49 +0000
commit7e226f2eebfaee319fde865b360ce5cb56e14924 (patch)
treede1007c91f2d499702cdf19d2b178fa0822db8cc
parent49b656eee89e64654812ed5081df9639ede50b57 (diff)
downloadfpc-7e226f2eebfaee319fde865b360ce5cb56e14924.tar.gz
Avoid GPF if currPath is empty in AddPath method, as this is accepted and handled later
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@43306 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r--compiler/cfileutl.pas2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/cfileutl.pas b/compiler/cfileutl.pas
index f0fffa12e4..d339e3897f 100644
--- a/compiler/cfileutl.pas
+++ b/compiler/cfileutl.pas
@@ -1076,7 +1076,7 @@ end;
DePascalQuote(currPath);
{ GNU LD convention: if library search path starts with '=', it's relative to the
sysroot; otherwise, interpret it as a regular path }
- if currPath[1]='=' then
+ if (length(currPath) >0) and (currPath[1]='=') then
currPath:=sysroot+FixPath(copy(currPath,2,length(currPath)-1),false)
else
currPath:=sysroot+FixPath(currPath,false);