shell32: Fix string size condition check (Coverity).

The issue was introduced by 68fd74e7f9.
This commit is contained in:
Nikolay Sivov 2023-10-30 17:30:43 +01:00 committed by Alexandre Julliard
parent bf58285a90
commit eb8cac0f08

View file

@ -164,8 +164,8 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp
case 'l':
case 'L':
if (lpFile) {
if ((size = SearchPathW(NULL, lpFile, L".exe", ARRAY_SIZE(xlpFile), xlpFile, NULL)
&& size <= ARRAY_SIZE(xlpFile)))
size = SearchPathW(NULL, lpFile, L".exe", ARRAY_SIZE(xlpFile), xlpFile, NULL);
if (size && size <= ARRAY_SIZE(xlpFile))
cmd = xlpFile;
else
cmd = lpFile;