Build a default command-line if the one we received is an empty

string.
This commit is contained in:
Alexandre Julliard 2002-10-17 18:24:36 +00:00
parent 4f716155fc
commit 43701b945d
1 changed files with 1 additions and 1 deletions

View File

@ -1078,7 +1078,7 @@ static LPSTR get_file_name( LPCSTR appname, LPSTR cmdline, LPSTR buffer,
/* use the unmodified app name as file name */
lstrcpynA( buffer, appname, buflen );
*handle = open_exe_file( buffer );
if (!(ret = cmdline))
if (!(ret = cmdline) || !cmdline[0])
{
/* no command-line, create one */
if ((ret = HeapAlloc( GetProcessHeap(), 0, strlen(appname) + 3 )))