Browse Source

* Patch from reporter of bug ID #13924 to fix arguments with spaces if no argv is declared.

git-svn-id: trunk@13246 -
michael 16 years ago
parent
commit
0021183eb6
1 changed files with 4 additions and 1 deletions
  1. 4 1
      rtl/inc/getopts.pp

+ 4 - 1
rtl/inc/getopts.pp

@@ -91,7 +91,10 @@ begin
   s:='';
   for i:=1 to paramcount do
     begin
-     s:=s+paramstr(i)+' ';
+    if Pos(' ', paramstr(i)) > 0 then 
+      s := s + '"' + paramstr(i) + '" '
+    else 
+      s:=s+paramstr(i)+' ';
     end;
   s:=s+#0;
   cmdline:=@s[1];