Correct the count so we deserialize properly
authorNeale Ferguson <neale@sinenomine.net>
Wed, 19 Dec 2012 21:05:37 +0000 (16:05 -0500)
committerNeale Ferguson <neale@sinenomine.net>
Wed, 19 Dec 2012 21:06:15 +0000 (16:06 -0500)
mcs/class/System.Core/System.Collections.Generic/HashSet.cs

index a1df82feedc55ebbfee3a88b8d0de58126b9775c..73aee92940be40ee8e7b8af5ebe3b3fbef73f744 100644 (file)
@@ -582,7 +582,7 @@ namespace System.Collections.Generic {
                        info.AddValue("Comparer", comparer, typeof(IEqualityComparer<T>));
                        info.AddValue("Capacity", (table == null) ? 0 : table.Length);
                        if (table != null) {
-                               T[] tableArray = new T[table.Length];
+                               T[] tableArray = new T[count];
                                CopyTo(tableArray);
                                info.AddValue("Elements", tableArray, typeof(T[]));
                        }