mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
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:
parent
7e4a551cd5
commit
a252566666
2 changed files with 2 additions and 0 deletions
|
@ -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++;
|
||||
|
|
|
@ -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++;
|
||||
|
|
Loading…
Reference in a new issue