Browse Source

* fixed null termination of cmdline (based on patch by C Western,
mantis #22742) -- that function seems like a good candidate to
put in a shared include file though

git-svn-id: trunk@22270 -

Jonas Maebe 13 years ago
parent
commit
c71cb9dc69
6 changed files with 6 additions and 6 deletions
  1. 1 1
      rtl/aix/system.pp
  2. 1 1
      rtl/bsd/system.pp
  3. 1 1
      rtl/linux/system.pp
  4. 1 1
      rtl/nds/system.pp
  5. 1 1
      rtl/solaris/system.pp
  6. 1 1
      rtl/wii/system.pp

+ 1 - 1
rtl/aix/system.pp

@@ -204,7 +204,7 @@ begin
         buf[bufsize]:='"';
         buf[bufsize]:='"';
         inc(bufsize);
         inc(bufsize);
       end;
       end;
-     if i<argc then
+     if i<argc-1 then
       buf[bufsize]:=' '
       buf[bufsize]:=' '
      else
      else
       buf[bufsize]:=#0;
       buf[bufsize]:=#0;

+ 1 - 1
rtl/bsd/system.pp

@@ -265,7 +265,7 @@ begin
         buf[bufsize]:='"';
         buf[bufsize]:='"';
         inc(bufsize);
         inc(bufsize);
       end;
       end;
-     if i<argc then
+     if i<argc-1 then
       buf[bufsize]:=' '
       buf[bufsize]:=' '
      else
      else
       buf[bufsize]:=#0;
       buf[bufsize]:=#0;

+ 1 - 1
rtl/linux/system.pp

@@ -197,7 +197,7 @@ begin
         buf[bufsize]:='"';
         buf[bufsize]:='"';
         inc(bufsize);
         inc(bufsize);
       end;
       end;
-     if i<argc then
+     if i<argc-1 then
       buf[bufsize]:=' '
       buf[bufsize]:=' '
      else
      else
       buf[bufsize]:=#0;
       buf[bufsize]:=#0;

+ 1 - 1
rtl/nds/system.pp

@@ -235,7 +235,7 @@ begin
         buf[bufsize]:='"';
         buf[bufsize]:='"';
         inc(bufsize);
         inc(bufsize);
       end;
       end;
-     if i<argc then
+     if i<argc-1 then
       buf[bufsize]:=' '
       buf[bufsize]:=' '
      else
      else
       buf[bufsize]:=#0;
       buf[bufsize]:=#0;

+ 1 - 1
rtl/solaris/system.pp

@@ -232,7 +232,7 @@ begin
         buf[bufsize]:='"';
         buf[bufsize]:='"';
         inc(bufsize);
         inc(bufsize);
       end;
       end;
-     if i<argc then
+     if i<argc-1 then
       buf[bufsize]:=' '
       buf[bufsize]:=' '
      else
      else
       buf[bufsize]:=#0;
       buf[bufsize]:=#0;

+ 1 - 1
rtl/wii/system.pp

@@ -209,7 +209,7 @@ begin
         buf[bufsize]:='"';
         buf[bufsize]:='"';
         inc(bufsize);
         inc(bufsize);
       end;
       end;
-     if i<argc then
+     if i<argc-1 then
       buf[bufsize]:=' '
       buf[bufsize]:=' '
      else
      else
       buf[bufsize]:=#0;
       buf[bufsize]:=#0;