Commit 552db89b authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

reg: Fixed 2 functionality bugs in REG DELETE (Coverity).

parent 13608c8b
......@@ -255,7 +255,8 @@ static int reg_delete(WCHAR *key_name, WCHAR *value_name, BOOL value_empty,
/* FIXME: Prompt for delete */
}
if (!value_name)
/* Delete subtree only if no /v* option is given */
if (!value_name && !value_empty && !value_all)
{
if (RegDeleteTreeW(root,p)!=ERROR_SUCCESS)
{
......@@ -293,10 +294,10 @@ static int reg_delete(WCHAR *key_name, WCHAR *value_name, BOOL value_empty,
while (1)
{
count = maxValue;
rc = RegEnumValueW(subkey, 0, value_name, &count, NULL, NULL, NULL, NULL);
rc = RegEnumValueW(subkey, 0, szValue, &count, NULL, NULL, NULL, NULL);
if (rc == ERROR_SUCCESS)
{
rc = RegDeleteValueW(subkey,value_name);
rc = RegDeleteValueW(subkey, szValue);
if (rc != ERROR_SUCCESS)
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment