浏览代码

* fixed 255 max path length assumptions left over from when the paths were
shortstrings (mentioned in mantis #15783)

git-svn-id: trunk@14997 -

Jonas Maebe 15 年之前
父节点
当前提交
db2655459c
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      compiler/cfileutl.pas

+ 3 - 3
compiler/cfileutl.pas

@@ -1044,7 +1044,7 @@ end;
           begin
           begin
             j:=Pos(';',s);
             j:=Pos(';',s);
             if j=0 then
             if j=0 then
-             j:=255;
+             j:=length(s)+1;
             currPath:= TrimSpace(Copy(s,1,j-1));
             currPath:= TrimSpace(Copy(s,1,j-1));
             System.Delete(s,1,j);
             System.Delete(s,1,j);
           end;
           end;
@@ -1060,9 +1060,9 @@ end;
             if (CurrentDir<>'') and (Copy(currPath,1,length(CurrentDir))=CurrentDir) then
             if (CurrentDir<>'') and (Copy(currPath,1,length(CurrentDir))=CurrentDir) then
              begin
              begin
 {$if defined(amiga) and defined(morphos)}
 {$if defined(amiga) and defined(morphos)}
-               currPath:= CurrentDir+Copy(currPath,length(CurrentDir)+1,255);
+               currPath:= CurrentDir+Copy(currPath,length(CurrentDir)+1,length(currPath));
 {$else}
 {$else}
-               currPath:= CurDirRelPath(source_info)+Copy(currPath,length(CurrentDir)+1,255);
+               currPath:= CurDirRelPath(source_info)+Copy(currPath,length(CurrentDir)+1,length(currPath));
 {$endif}
 {$endif}
              end;
              end;
           end;
           end;