reg: Fail if duplicate command-line switches are passed to 'reg query'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
8e7738be92
commit
2c84ec7ee0
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue