mirror of
https://github.com/reactos/reactos.git
synced 2025-07-30 14:12:11 +00:00
[WINESYNC] reg: Fail if duplicate command-line switches are passed to 'reg add'.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 08976b3ee0db827bc5add829de1f148da89a6362 by Hugh McMaster <hugh.mcmaster@outlook.com>
This commit is contained in:
parent
65957cc65b
commit
cb66fe28ba
3 changed files with 6 additions and 4 deletions
|
@ -227,6 +227,7 @@ int reg_add(int argc, WCHAR *argvW[])
|
|||
|
||||
if (!lstrcmpiW(str, L"ve"))
|
||||
{
|
||||
if (value_empty) goto invalid;
|
||||
value_empty = TRUE;
|
||||
continue;
|
||||
}
|
||||
|
@ -249,11 +250,12 @@ int reg_add(int argc, WCHAR *argvW[])
|
|||
break;
|
||||
case 's':
|
||||
str = argvW[++i];
|
||||
if (!str || lstrlenW(str) != 1)
|
||||
if (separator || !str || lstrlenW(str) != 1)
|
||||
goto invalid;
|
||||
separator = str[0];
|
||||
break;
|
||||
case 'f':
|
||||
if (force) goto invalid;
|
||||
force = TRUE;
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue