Fix for Bug 3269 (resend)

Yuriy yuriy.kozlov at gmail.com
Fri Jul 28 12:38:44 CDT 2006


Hi, I am not sure why this got rejected/ignored the first time, but
I'll try to include more info in the email this time and format it
correctly.

The problem:
see http://bugs.winehq.org/show_bug.cgi?id=3269


Description:
This patch allows deleting values using a .reg file by putting
"TestValue"=-
If valdata starts with - without quotes, the value is deleted.  This
fixes half of the bug.


Change:
Allow entering - for a value in a .reg file to delete that value.


The patch:

RCS file: /home/wine/wine/programs/regedit/regproc.c,v
retrieving revision 1.23
diff -u -r1.23 regproc.c
--- programs/regedit/regproc.c  23 May 2006 12:49:20 -0000      1.23
+++ programs/regedit/regproc.c  28 Jul 2006 17:14:44 -0000
@@ -392,6 +392,13 @@
     if ( (val_name == NULL) || (val_data == NULL) )
         return ERROR_INVALID_PARAMETER;

+    if (val_data[0] == '-')
+    {
+        hRes = RegDeleteValue(currentKeyHandle,val_name);
+        HeapFree (GetProcessHeap(), 0, bBigBuffer);
+        return hRes;
+    }
+
     /* Get the data type stored into the value field */
     dwDataType = getDataType(&val_data, &dwParseType);



More information about the wine-patches mailing list