Explorar el Código

* load environment on msdos if parameters are loaded, so paramstr(0) is loaded as well

git-svn-id: trunk@38205 -
florian hace 7 años
padre
commit
c63c3e99c7
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      rtl/msdos/system.pp

+ 2 - 0
rtl/msdos/system.pp

@@ -367,6 +367,8 @@ var
   arg: PChar;
   arg: PChar;
   doscmd   : string[129];  { Dos commandline copied from PSP, max is 128 chars +1 for terminating zero }
   doscmd   : string[129];  { Dos commandline copied from PSP, max is 128 chars +1 for terminating zero }
 begin
 begin
+  { force environment to be setup so dos_argv0 is loaded }
+  envp;
   { load commandline from psp }
   { load commandline from psp }
   SetLength(doscmd, Mem[PrefixSeg:$80]);
   SetLength(doscmd, Mem[PrefixSeg:$80]);
   for I := 1 to length(doscmd) do
   for I := 1 to length(doscmd) do