Stefan Leichter <stefan.leich...@camline.com> writes:

> @@ -1711,32 +1713,35 @@
>       }
>       else
>       {
> -         /* If the executable name is not quoted, we have to use this search 
> loop here,
> +            /* FIXME: what versions support this? Fails on 2000/XP
> +               If the executable name is not quoted, we have to use this 
> search loop here,
>              that in CreateProcess() is not sufficient because it does not 
> handle shell links. */
>           WCHAR buffer[MAX_PATH], xlpFile[MAX_PATH];
> -         LPWSTR space, s;
> +            LPWSTR space;
>  
> -         LPWSTR beg = wszApplicationName/*sei_tmp.lpFile*/;
> -         for(s=beg; (space=strchrW(s, ' ')); s=space+1) {
> -             int idx = space-sei_tmp.lpFile;
> -             memcpy(buffer, sei_tmp.lpFile, idx * sizeof(WCHAR));
> +            lstrcpynW(buffer, wszApplicationName, 
> sizeof(buffer)/sizeof(WCHAR));
> +            space = buffer + strlenW(buffer);
> +            do

Searching from the end doesn't look right. This would need a test case.

-- 
Alexandre Julliard
julli...@winehq.org


Reply via email to