瀏覽代碼

* don't search use extrapath for searching ppc* if extrapath is empty because this might find undesired compilers in the current directory

git-svn-id: trunk@14835 -
florian 15 年之前
父節點
當前提交
b8e58428ed
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      compiler/utils/fpc.pp

+ 4 - 1
compiler/utils/fpc.pp

@@ -86,7 +86,10 @@ program fpc;
         extrapath:=extrapath+DirectorySeparator;
       { get path of fpc.exe }
       path:=splitpath(paramstr(0));
-      if FileExists(extrapath+ppcbin) then
+      { don't try with an empty extra patch, this might have strange results
+        if the current directory contains a compiler
+      }
+      if (extrapath<>'') and FileExists(extrapath+ppcbin) then
        begin
          ppcbin:=extrapath+ppcbin;
          findexe:=true;