Commit 15aef00f authored by Alexandre Julliard's avatar Alexandre Julliard

Skip quoted program name when building command line.

parent 12884304
......@@ -295,6 +295,9 @@ BOOL TASK_Create( NE_MODULE *pModule, UINT16 cmdShow, TEB *teb, LPCSTR cmdline,
if (!cmdline)
{
cmdline = pdb32->env_db->cmd_line;
/* remove the first word (program name) */
if (*cmdline == '"')
if (!(cmdline = strchr( cmdline+1, '"' ))) cmdline = pdb32->env_db->cmd_line;
while (*cmdline && (*cmdline != ' ') && (*cmdline != '\t')) cmdline++;
while ((*cmdline == ' ') || (*cmdline == '\t')) cmdline++;
len = strlen(cmdline);
......@@ -304,6 +307,8 @@ BOOL TASK_Create( NE_MODULE *pModule, UINT16 cmdShow, TEB *teb, LPCSTR cmdline,
memcpy( pTask->pdb.cmdLine + 1, cmdline, len );
/* pTask->pdb.cmdLine[len+1] = 0; */
TRACE("module='%s' cmdline='%.*s' task=%04x\n", name, len, cmdline, hTask );
/* Get the compatibility flags */
pTask->compat_flags = GetProfileIntA( "Compatibility", name, 0 );
......@@ -336,8 +341,6 @@ BOOL TASK_Create( NE_MODULE *pModule, UINT16 cmdShow, TEB *teb, LPCSTR cmdline,
teb->htask16 = hTask;
if (!initial_task) initial_task = hTask;
TRACE("module='%s' cmdline='%.*s' task=%04x\n", name, *cmdline, cmdline+1, hTask );
/* Add the task to the linked list */
SYSLEVEL_EnterWin16Lock();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment