mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 02:59:21 +02:00
* check added to avoid potential SIGSEGV
git-svn-id: trunk@1261 -
This commit is contained in:
parent
da9ea7ff88
commit
022e3ceef8
@ -1352,6 +1352,9 @@ implementation
|
|||||||
startpc,pc : pchar;
|
startpc,pc : pchar;
|
||||||
sepch : char;
|
sepch : char;
|
||||||
begin
|
begin
|
||||||
|
FindFilePchar:=false;
|
||||||
|
if Assigned (Path) then
|
||||||
|
begin
|
||||||
{$ifdef Unix}
|
{$ifdef Unix}
|
||||||
sepch:=':';
|
sepch:=':';
|
||||||
{$else}
|
{$else}
|
||||||
@ -1361,7 +1364,6 @@ implementation
|
|||||||
sepch:=';';
|
sepch:=';';
|
||||||
{$endif macos}
|
{$endif macos}
|
||||||
{$endif Unix}
|
{$endif Unix}
|
||||||
FindFilePchar:=false;
|
|
||||||
pc:=path;
|
pc:=path;
|
||||||
repeat
|
repeat
|
||||||
startpc:=pc;
|
startpc:=pc;
|
||||||
@ -1377,6 +1379,7 @@ implementation
|
|||||||
break;
|
break;
|
||||||
inc(pc);
|
inc(pc);
|
||||||
until false;
|
until false;
|
||||||
|
end;
|
||||||
foundfile:=f;
|
foundfile:=f;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user