set argc=1 when no cmdline

git-svn-id: svn://kolibrios.org@952 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Sergey Semyonov (Serge) 2008-12-12 10:22:35 +00:00
parent 7e3b4f9643
commit 7923c9765d

View File

@ -86,9 +86,12 @@ void __F_NAME(__NTMain,__wNTMain)( void )
__appcwd= (char*)malloc(__appcwdlen);
strncpy(__appcwd, _LpPgmName, __appcwdlen);
__appcwd[__appcwdlen] = 0;
___Argc = 2;
___Argv[0] = _LpPgmName;
___Argv[1] = _LpCmdLine;
if( *_LpCmdLine != 0)
{
___Argc = 2;
___Argv[1] = _LpCmdLine;
} else ___Argc = 1;
#ifdef __WIDECHAR__
exit( wmain( ___wArgc, ___wArgv ) );