Commit 2c84ec7e authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

reg: Fail if duplicate command-line switches are passed to 'reg query'.

parent 8e7738be
......@@ -344,6 +344,7 @@ int reg_query(int argc, WCHAR *argvW[])
if (!lstrcmpiW(str, L"ve"))
{
if (value_empty) goto invalid;
value_empty = TRUE;
continue;
}
......@@ -357,6 +358,7 @@ int reg_query(int argc, WCHAR *argvW[])
goto invalid;
break;
case 's':
if (recurse) goto invalid;
recurse = TRUE;
break;
default:
......
......@@ -117,7 +117,7 @@ static void test_query(void)
"got exit code %d, expected 0\n", r);
run_reg_exe("reg query HKCU\\" KEY_BASE " /s /s", &r);
todo_wine ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
/* Clean-up, then query */
delete_key(key, "subkey");
......
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