[PATCH 1/6] reg: Do not allow combinations of /v, /ve or /va in the 'delete' function

Hugh McMaster hugh.mcmaster at outlook.com
Wed Feb 10 05:23:14 CST 2016


Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
---
 programs/reg/reg.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/programs/reg/reg.c b/programs/reg/reg.c
index 04256bc..322fa90 100644
--- a/programs/reg/reg.c
+++ b/programs/reg/reg.c
@@ -395,13 +395,7 @@ static int reg_delete(WCHAR *key_name, WCHAR *value_name, BOOL value_empty,
         return 1;
     }
 
-    if (value_name && value_empty)
-    {
-        output_message(STRING_INVALID_CMDLINE);
-        return 1;
-    }
-
-    if (value_empty && value_all)
+    if ((value_name && value_empty) || (value_name && value_all) || (value_empty && value_all))
     {
         output_message(STRING_INVALID_CMDLINE);
         return 1;
-- 
1.9.1




More information about the wine-patches mailing list