Commit 9be151c2 authored by Misha Koshelev's avatar Misha Koshelev Committed by Alexandre Julliard

shell32: Conform to native in SHELL_ArgifyW for unquoted %1 in registry keys.

parent e0940226
......@@ -156,32 +156,11 @@ static BOOL SHELL_ArgifyW(WCHAR* out, int len, const WCHAR* fmt, const WCHAR* lp
else
cmd = lpFile;
/* Add double quotation marks unless we already have them
(e.g.: "file://%1" %* for exefile) or unless the arg is already
enclosed in double quotation marks */
if ((res == out || *(fmt + 1) != '"') && *cmd != '"')
used += strlenW(cmd);
if (used < len)
{
used++;
if (used < len)
*res++ = '"';
used += strlenW(cmd);
if (used < len)
{
strcpyW(res, cmd);
res += strlenW(cmd);
}
used++;
if (used < len)
*res++ = '"';
}
else
{
used += strlenW(cmd);
if (used < len)
{
strcpyW(res, cmd);
res += strlenW(cmd);
}
strcpyW(res, cmd);
res += strlenW(cmd);
}
}
found_p1 = TRUE;
......
......@@ -1064,7 +1064,7 @@ static dde_tests_t dde_tests[] =
/* Test unquoted %1 in command and ddeexec
* (test filename has space) */
{"%1", "[open(%1)]", "shlexec", "dde", NULL, 2, "[open(%s)]", 0xa, 33},
{"%1", "[open(%1)]", "shlexec", "dde", NULL, 2, "[open(%s)]", 0x0, 33},
/* Test ifexec precedence over ddeexec */
{"", "[open(\"%1\")]", "shlexec", "dde", "[ifexec(\"%1\")]", FALSE, "[ifexec(\"%s\")]", 0x0, 33},
......
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