From: Liam Middlebrook <lmiddlebrook(a)nvidia.com> Previously if an empty-string was encountered while parsing out PATH, cmd.exe would ignore the rest of the PATH entirely. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55097 Signed-off-by: Liam Middlebrook <lmiddlebrook(a)nvidia.com> --- programs/cmd/wcmdmain.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c index 022ff6637c5..de6e721b26a 100644 --- a/programs/cmd/wcmdmain.c +++ b/programs/cmd/wcmdmain.c @@ -1135,6 +1135,12 @@ void WCMD_run_program (WCHAR *command, BOOL called) else lstrcpyW(temp, thisDir + 1); + /* When temp is an empty string, skip over it. This needs + to be done before the expansion, because WCMD_get_fullpath + fails when given an empty string */ + if (*temp == '\0') + continue; + /* Since you can have eg. ..\.. on the path, need to expand to full information */ if (!WCMD_get_fullpath(temp, ARRAY_SIZE(thisDir), thisDir, NULL)) return; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3121