https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8dc46f32b03fbb566ffbc…
commit 8dc46f32b03fbb566ffbc62e05687a6b4d4df1e7
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Jan 16 20:48:04 2022 +0100
Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com>
CommitDate: Sun Jun 19 13:06:30 2022 +0200
[WINESYNC] reg: Fail if duplicate command-line switches are passed to 'reg
query'.
Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 2c84ec7ee04ab03883907691f115e01a7165b6e9 by Hugh McMaster
<hugh.mcmaster(a)outlook.com>
---
base/applications/cmdutils/reg/query.c | 2 ++
modules/rostests/winetests/reg/query.c | 2 +-
sdk/tools/winesync/reg.cfg | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/base/applications/cmdutils/reg/query.c
b/base/applications/cmdutils/reg/query.c
index 7ae99fad6d5..c8277cd7114 100644
--- a/base/applications/cmdutils/reg/query.c
+++ b/base/applications/cmdutils/reg/query.c
@@ -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:
diff --git a/modules/rostests/winetests/reg/query.c
b/modules/rostests/winetests/reg/query.c
index fcd43a4b195..e2b438f8c92 100644
--- a/modules/rostests/winetests/reg/query.c
+++ b/modules/rostests/winetests/reg/query.c
@@ -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");
diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg
index df410292a44..a3ccfd52f30 100644
--- a/sdk/tools/winesync/reg.cfg
+++ b/sdk/tools/winesync/reg.cfg
@@ -4,4 +4,4 @@ directories:
files:
programs/reg/resource.h: base/applications/cmdutils/reg/resource.h
tags:
- wine: 8e7738be92888c3aae19ab799d232d3f5112254c
+ wine: 2c84ec7ee04ab03883907691f115e01a7165b6e9