Commit df9715b1 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

shell32: Fix FindExecutableW() to not check if lpResult after using it. It's…

shell32: Fix FindExecutableW() to not check if lpResult after using it. It's supposed to cause a segfault anyway. Use SE_ERR_FNF rather than a numeric literal.
parent 2538fa31
...@@ -1013,13 +1013,8 @@ HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpR ...@@ -1013,13 +1013,8 @@ HINSTANCE WINAPI FindExecutableW(LPCWSTR lpFile, LPCWSTR lpDirectory, LPWSTR lpR
(lpFile != NULL ? debugstr_w(lpFile) : "-"), (lpDirectory != NULL ? debugstr_w(lpDirectory) : "-")); (lpFile != NULL ? debugstr_w(lpFile) : "-"), (lpDirectory != NULL ? debugstr_w(lpDirectory) : "-"));
lpResult[0] = '\0'; /* Start off with an empty return string */ lpResult[0] = '\0'; /* Start off with an empty return string */
if (lpFile == NULL)
/* trap NULL parameters on entry */ return (HINSTANCE)SE_ERR_FNF;
if ((lpFile == NULL) || (lpResult == NULL))
{
/* FIXME - should throw a warning, perhaps! */
return (HINSTANCE)2; /* File not found. Close enough, I guess. */
}
if (lpDirectory) if (lpDirectory)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment