瀏覽代碼

* call uniquestring before calling stringtoppchar

git-svn-id: trunk@709 -
peter 20 年之前
父節點
當前提交
b0e5f64091
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      rtl/unix/sysutils.pp

+ 4 - 1
rtl/unix/sysutils.pp

@@ -651,7 +651,7 @@ Function FileSetDate (Const FileName : String;Age : Longint) : Longint;
 
 
 var
 var
   t: TUTimBuf;
   t: TUTimBuf;
-  
+
 begin
 begin
   Result := 0;
   Result := 0;
   t.actime := Age;
   t.actime := Age;
@@ -923,6 +923,9 @@ Begin
    if Comline<>'' Then
    if Comline<>'' Then
      begin
      begin
        CommandLine:=ComLine;
        CommandLine:=ComLine;
+       { Make an unique copy because stringtoppchar modifies the
+         string }
+       UniqueString(CommandLine);
        cmdline2:=StringtoPPChar(CommandLine,1);
        cmdline2:=StringtoPPChar(CommandLine,1);
        cmdline2^:=pchar(Path);
        cmdline2^:=pchar(Path);
      end
      end