Explorar el Código

initialize result before passing it to FindFile()

git-svn-id: trunk@40217 -
Károly Balogh hace 6 años
padre
commit
12a22b593d
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      compiler/systems/t_bsd.pas

+ 2 - 2
compiler/systems/t_bsd.pas

@@ -373,14 +373,14 @@ Function TLinkerBSD.GetDarwinPrtobjName(isdll: boolean): TCmdStr;
 var
   startupfile: TCmdStr;
 begin
+  result:='';
+
   startupfile:=GetDarwinCrt1ObjName(isdll);
   if startupfile<>'' then
     begin
      if not librarysearchpath.FindFile(startupfile,false,result) then
        result:='/usr/lib/'+startupfile
     end
-  else
-    result:='';
   result:=maybequoted(result);
 end;