Author: miguel
Date: 2006-03-12 15:58:06 -0500 (Sun, 12 Mar 2006)
New Revision: 57880

Modified:
   branches/mono-1-1-13/mcs/class/corlib/Microsoft.Win32/ChangeLog
   branches/mono-1-1-13/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs
Log:
2006-03-12  Robert Jordan <[EMAIL PROTECTED]>

        * UnixRegistryApi.cs (DeleteValue): Avoid crash, fixes bug #77772

Modified: branches/mono-1-1-13/mcs/class/corlib/Microsoft.Win32/ChangeLog
===================================================================
--- branches/mono-1-1-13/mcs/class/corlib/Microsoft.Win32/ChangeLog     
2006-03-12 19:59:55 UTC (rev 57879)
+++ branches/mono-1-1-13/mcs/class/corlib/Microsoft.Win32/ChangeLog     
2006-03-12 20:58:06 UTC (rev 57880)
@@ -1,3 +1,7 @@
+2006-03-12  Robert Jordan <[EMAIL PROTECTED]>
+
+       * UnixRegistryApi.cs (DeleteValue): Avoid crash, fixes bug #77772
+
 2006-01-14  Robert Jordan  <[EMAIL PROTECTED]>
 
        * RegistryKey.cs: Added internal IsRoot accessor.
@@ -5,11 +9,11 @@
        Fixes bug #77212. Thanks to Don Edvalson ([EMAIL PROTECTED])
        for spotting this out.
 
-2005-12-02  Atsushi Enomoto  <[EMAIL PROTECTED]>
-
-       * Win32RegistryApi.cs : fixed invalid cast. Now mono is not to blame
-         for not being able to run NAnt on Windows.
-
+2005-12-02  Atsushi Enomoto  <[EMAIL PROTECTED]>
+
+       * Win32RegistryApi.cs : fixed invalid cast. Now mono is not to blame
+         for not being able to run NAnt on Windows.
+
 2005-11-12  Miguel de Icaza  <[EMAIL PROTECTED]>
 
        * RegistryKey.cs: Add support for a Registry on Unix based on
@@ -32,54 +36,54 @@
        * RegistryKey.cs: explicit implementation of IDisposable to match 
        MS corlib
 
-2004-03-17  Jackson Harper  <[EMAIL PROTECTED]>
-
-       * Win32RegistryApi.cs: Fix typo. Patch by Gert Driesen.
-
-2004-03-03  Jackson Harper  <[EMAIL PROTECTED]>
-
-       * Win32RegistryApi.cs: Specify entry points.
-       
-2004-03-03  Jackson Harper <[EMAIL PROTECTED]>
-
-       * Win32RegistryApi.cs: New file - pinvokes to the win32
-       registry. Patch  by Erik LeBel.
-       * IRegistryApi.cs: New file - Interface to a registry backend
-       (win32 on windows, no implementation on unix). This interface will
-       probably change when we write a Linux backend.
-       * Win32ResultCode.cs: New file - Win32 result codes needed to
-       check pinvoke. Patch by Erik LeBel.
-       * Registry.cs: Create the keys. Patch by Erik LeBel.
-       * RegistryKey.cs: Implement. Patch by Erik LeBel.
-       
-2003-12-27  Nick Drochak  <[EMAIL PROTECTED]>
-
-       * RegistryKey.cs: Add some missing overloads.
-
-2003-02-10  Nick Drochak  <[EMAIL PROTECTED]>
-
-       * Registry.cs: Class should be sealed and have a private default ctor.
-
-2002-11-28  Alejandro S�nchez Acosta  <[EMAIL PROTECTED]>
-
-       * Registry.cs: Added missed field.
-
-2002-11-28  Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
-
-       * RegistryHive.cs: patch from Jackson Harper that fixes compilation.
-
-2002-11-27  DennisHayes <[EMAIL PROTECTED]>    
-
-       * checkin for Alexandre Pigolkine ([EMAIL PROTECTED]) with minor changes
-       * needed for System.Windows.Forms
-       
-       * RegistryHive.cs
-       * Registry.cs
-       * added files, fully implmented?
-       
-       * RegistryKey.cs
-       * added more iplmentation
-
-2002-11-20  Nick Drochak  <[EMAIL PROTECTED]>
-
-       * RegistryKey.cs: Fix typo.
+2004-03-17  Jackson Harper  <[EMAIL PROTECTED]>
+
+       * Win32RegistryApi.cs: Fix typo. Patch by Gert Driesen.
+
+2004-03-03  Jackson Harper  <[EMAIL PROTECTED]>
+
+       * Win32RegistryApi.cs: Specify entry points.
+       
+2004-03-03  Jackson Harper <[EMAIL PROTECTED]>
+
+       * Win32RegistryApi.cs: New file - pinvokes to the win32
+       registry. Patch  by Erik LeBel.
+       * IRegistryApi.cs: New file - Interface to a registry backend
+       (win32 on windows, no implementation on unix). This interface will
+       probably change when we write a Linux backend.
+       * Win32ResultCode.cs: New file - Win32 result codes needed to
+       check pinvoke. Patch by Erik LeBel.
+       * Registry.cs: Create the keys. Patch by Erik LeBel.
+       * RegistryKey.cs: Implement. Patch by Erik LeBel.
+       
+2003-12-27  Nick Drochak  <[EMAIL PROTECTED]>
+
+       * RegistryKey.cs: Add some missing overloads.
+
+2003-02-10  Nick Drochak  <[EMAIL PROTECTED]>
+
+       * Registry.cs: Class should be sealed and have a private default ctor.
+
+2002-11-28  Alejandro S�nchez Acosta  <[EMAIL PROTECTED]>
+
+       * Registry.cs: Added missed field.
+
+2002-11-28  Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+       * RegistryHive.cs: patch from Jackson Harper that fixes compilation.
+
+2002-11-27  DennisHayes <[EMAIL PROTECTED]>    
+
+       * checkin for Alexandre Pigolkine ([EMAIL PROTECTED]) with minor changes
+       * needed for System.Windows.Forms
+       
+       * RegistryHive.cs
+       * Registry.cs
+       * added files, fully implmented?
+       
+       * RegistryKey.cs
+       * added more iplmentation
+
+2002-11-20  Nick Drochak  <[EMAIL PROTECTED]>
+
+       * RegistryKey.cs: Fix typo.

Modified: 
branches/mono-1-1-13/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs
===================================================================
--- branches/mono-1-1-13/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs    
2006-03-12 19:59:55 UTC (rev 57879)
+++ branches/mono-1-1-13/mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs    
2006-03-12 20:58:06 UTC (rev 57880)
@@ -366,18 +366,14 @@
                        return self.values.Keys.Count;
                }
                
-               public void DeleteValue (RegistryKey rkey, string value, bool 
throw_if_missing)
+               public void DeleteValue (RegistryKey rkey, string name, bool 
throw_if_missing)
                {
                        KeyHandler self = KeyHandler.Lookup (rkey);
 
-                       foreach (DictionaryEntry de in self.values){
-                               if ((string)de.Value == value){
-                                       self.values.Remove (de.Key);
-                                       return;
-                               }
-                       }
-                       if (throw_if_missing)
-                               throw new ArgumentException ("the given value 
does not exist", "value");
+                       if (throw_if_missing && !self.values.Contains (name))
+                               throw new ArgumentException ("the given value 
does not exist", "name");
+
+                       self.values.Remove (name);
                }
                
                public void DeleteKey (RegistryKey rkey, string keyname, bool 
throw_if_missing)

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to