Fixed a minor bug in __getmainargs()/__GetMainArgs().

The parser for argc/argv inserts '\0'-characters in the buffer (CommandLineA).
The next call to GetCommandLineA() returns only the first parameter (program name).

svn path=/trunk/; revision=2137
This commit is contained in:
Hartmut Birr 2001-08-02 12:39:35 +00:00
parent 7e4a551cd5
commit a252566666
2 changed files with 2 additions and 0 deletions

View file

@ -94,6 +94,7 @@ int __GetMainArgs(int *argc,char ***argv,char ***env,int flag)
__argc++;
_acmdln_dll[i]='\0';
__argv[__argc-1] = strdup(_acmdln_dll + afterlastspace);
_acmdln_dll[i]=' ';
i++;
while (_acmdln_dll[i]==' ')
i++;

View file

@ -33,6 +33,7 @@ int __getmainargs(int *argc,char ***argv,char ***env,int flag)
__argc++;
_acmdln[i]='\0';
__argv[__argc-1] = strdup(_acmdln + afterlastspace);
_acmdln[i]=' ';
i++;
while (_acmdln[i]==' ')
i++;