Commit 0dac54b3 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

regedit: Having garbage after the dash in '"foo"=-' is not valid.

Don't complain if the value already does not exist.
parent bde3cf9b
......@@ -219,8 +219,11 @@ static LONG setValue(LPSTR val_name, LPSTR val_data)
if ( (val_name == NULL) || (val_data == NULL) )
return ERROR_INVALID_PARAMETER;
if (val_data[0] == '-')
return RegDeleteValue(currentKeyHandle,val_name);
if (strcmp(val_data, "-") == 0)
{
res=RegDeleteValue(currentKeyHandle,val_name);
return (res == ERROR_FILE_NOT_FOUND ? ERROR_SUCCESS : res);
}
/* Get the data type stored into the value field */
dwDataType = getDataType(&val_data, &dwParseType);
......
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