WinExec16 should not split quoted filenames with spaces.

This commit is contained in:
Peter Ganten 2000-08-01 20:55:22 +00:00 committed by Alexandre Julliard
parent 9e38c64985
commit 44d0d1907e

View file

@ -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;