[PATCH] shell32: Avoid an unneeded strlenW() call.
Signed-off-by: Francois Gouget <fgouget(a)free.fr> --- Note that command is a buffer and cannot be NULL. dlls/shell32/shlexec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/shell32/shlexec.c b/dlls/shell32/shlexec.c index aca02d74888..28f2e36f9a7 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -736,7 +736,7 @@ static UINT SHELL_FindExecutable(LPCWSTR lpPath, LPCWSTR lpFile, LPCWSTR lpVerb, extension++; if (GetProfileStringW(wExtensions, extension, wszEmpty, command, ARRAY_SIZE(command)) > 0) { - if (strlenW(command) != 0) + if (*command) { strcpyW(lpResult, command); tok = strchrW(lpResult, '^'); /* should be ^.extension? */ -- 2.19.2
Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=45576 Your paranoid android. === debian9 (32 bit WoW report) === shell32: shelllink.c:811: Test failed: save failed (0x80070020) shelllink.c:811: Test failed: got 0x00000001 shelllink.c:811: Test failed: Didn't expect NULL shelllink.c:506: Test failed: GetCurFile fails on shell32 < 5.0 shelllink.c:813: Test failed: GetIconLocation returned 'C:\users\winetest\Temp\test.txt' instead of 'C:\users\winetest\Temp\\test.txt'
participants (2)
-
Francois Gouget -
Marvin