reg: Exit with an error if the specified operation is invalid.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2016-06-03 05:23:39 +00:00 committed by Alexandre Julliard
parent 6a927ef70c
commit 33d657f55c
1 changed files with 7 additions and 0 deletions

View File

@ -939,6 +939,13 @@ int wmain(int argc, WCHAR *argvW[])
op = get_operation(argvW[1]);
if (op == REG_INVALID)
{
output_message(STRING_INVALID_OPTION, argvW[1]);
output_message(STRING_REG_HELP);
return 1;
}
if (op == REG_ADD)
{
WCHAR *key_name, *value_name = NULL, *type = NULL, separator = '\0', *data = NULL;