11 Dec
2024
11 Dec
'24
5:25 p.m.
Hans Leidekker (@hans) commented about dlls/shell32/shlexec.c:
sei->hProcess = NULL;
+ /* remove trailing spaces */ + if (sei_tmp.lpFile) + { + WCHAR *buf = wcsdup(sei->lpFile), *end = buf + wcslen( buf ) - 1; + while (end >= buf && *end == ' ') *end-- = 0; + sei_tmp.lpFile = buf; + }
Thanks Louis. Could you also test and handle leading spaces if needed? Also, buf is not freed. I think it would be better to integrate this in the code below that already creates a copy. It should be possible to have just one block where you skip leading/trailing spaces as well as outer quotes, if any. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6997#note_90276