[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:
winesync 2022-01-16 20:48:04 +01:00 committed by Thomas Csovcsity
parent 65957cc65b
commit cb66fe28ba
3 changed files with 6 additions and 4 deletions

View file

@ -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: