From: Louis Lenders xerox.xerox2000x@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=56940 --- dlls/shell32/shlexec.c | 6 ++++++ dlls/shell32/tests/shlexec.c | 9 +++++++++ 2 files changed, 15 insertions(+)
diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index 828c7168a34..c640bb42846 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -1655,6 +1655,12 @@ static BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc )
sei->hProcess = NULL;
+ /* remove trailing spaces */ + if (sei_tmp.lpFile) + { + WCHAR *end = (WCHAR *)sei_tmp.lpFile + wcslen( sei_tmp.lpFile ) - 1; + while (end >= sei_tmp.lpFile && *end == ' ') *end-- = 0; + } /* make copies of all path/command strings */ if (!sei_tmp.lpFile) { diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index bd32ece8705..9579e18a531 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -1166,6 +1166,15 @@ static void test_lpFile_parsed(void) NULL, ""%TMPDIR%\simple.shlexec"", NULL, NULL, NULL); okShell(rc > 32 || broken(rc == SE_ERR_FNF) /* Win95/NT4 */, "failed: rc=%Iu\n", rc); + /* test lpfile + trailing space */ + rc=shell_execute_ex(SEE_MASK_DOENVSUBST | SEE_MASK_FLAG_NO_UI, + NULL, "%TMPDIR%\simple.shlexec ", NULL, NULL, NULL); + okShell(rc > 32, "failed: rc=%Iu\n", rc); + /* test lpfile + leading space */ + rc=shell_execute_ex(SEE_MASK_DOENVSUBST | SEE_MASK_FLAG_NO_UI, + NULL, " %TMPDIR%\simple.shlexec", NULL, NULL, NULL); + okShell(rc == SE_ERR_FNF, "failed: rc=%Iu\n", rc); + }
typedef struct
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=147087
Your paranoid android.
=== debian11b (64 bit WoW report) ===
ddraw: ddraw1.c:3645: Test failed: Expected (0,0)-(640,480), got (-32000,-32000)-(-31840,-31969).
secur32: schannel.c:1138: Test failed: Wrong buffer size schannel.c:1187: Test failed: InitializeSecurityContext failed: 80090304 schannel.c:1575: Test failed: got 80090304
urlmon: protocol.c:857: Test failed: szStatusText = L"text/javascript"
You forgot the `Wine-Bug` part :frog: