From d182559161c2d5026c7fcc39533fd5a5f54e2981 Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Mon, 25 Feb 2008 09:01:56 +0000 Subject: [PATCH] shell32: Fix the character count passed to SearchPathW in SHELL_execute. --- 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 7cf0b0394ea..f55e05c1a7f 100644 --- a/dlls/shell32/shlexec.c +++ b/dlls/shell32/shlexec.c @@ -1698,7 +1698,7 @@ BOOL SHELL_execute( LPSHELLEXECUTEINFOW sei, SHELL_ExecuteW32 execfunc ) buffer[idx] = '\0'; /*FIXME This finds directory paths if the targeted file name contains spaces. */ - if (SearchPathW(*sei_tmp.lpDirectory? sei_tmp.lpDirectory: NULL, buffer, wszExe, sizeof(xlpFile), xlpFile, NULL)) + if (SearchPathW(*sei_tmp.lpDirectory? sei_tmp.lpDirectory: NULL, buffer, wszExe, sizeof(xlpFile)/sizeof(xlpFile[0]), xlpFile, NULL)) { /* separate out command from parameter string */ LPCWSTR p = space + 1;