mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-02 13:27:35 +00:00
WinExec16 should not split quoted filenames with spaces.
This commit is contained in:
parent
9e38c64985
commit
44d0d1907e
1 changed files with 6 additions and 2 deletions
|
@ -712,13 +712,17 @@ BOOL WINAPI GetBinaryTypeW( LPCWSTR lpApplicationName, LPDWORD lpBinaryType )
|
|||
*/
|
||||
HINSTANCE16 WINAPI WinExec16( LPCSTR lpCmdLine, UINT16 nCmdShow )
|
||||
{
|
||||
LPCSTR p;
|
||||
LPCSTR p = NULL;
|
||||
LPSTR name, cmdline;
|
||||
int len;
|
||||
HINSTANCE16 ret;
|
||||
char buffer[MAX_PATH];
|
||||
|
||||
if ((p = strchr( lpCmdLine, ' ' )))
|
||||
if ( ( *lpCmdLine == '"' ) && ( p = strchr ( lpCmdLine+1, '"' ) ) )
|
||||
p = strchr ( p, ' ' );
|
||||
else
|
||||
p = strchr( lpCmdLine, ' ' );
|
||||
if ( p )
|
||||
{
|
||||
if (!(name = HeapAlloc( GetProcessHeap(), 0, p - lpCmdLine + 1 )))
|
||||
return ERROR_NOT_ENOUGH_MEMORY;
|
||||
|
|
Loading…
Reference in a new issue