mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-05 21:50:00 +00:00
Skip quoted program name when building command line.
This commit is contained in:
parent
128843046d
commit
15aef00f29
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue