From: Neale Ferguson Date: Wed, 19 Dec 2012 21:05:37 +0000 (-0500) Subject: Correct the count so we deserialize properly X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=2d917005cc80ce43b6b925bf90169a6288852acb;p=mono.git Correct the count so we deserialize properly --- diff --git a/mcs/class/System.Core/System.Collections.Generic/HashSet.cs b/mcs/class/System.Core/System.Collections.Generic/HashSet.cs index a1df82feedc..73aee92940b 100644 --- a/mcs/class/System.Core/System.Collections.Generic/HashSet.cs +++ b/mcs/class/System.Core/System.Collections.Generic/HashSet.cs @@ -582,7 +582,7 @@ namespace System.Collections.Generic { info.AddValue("Comparer", comparer, typeof(IEqualityComparer)); 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[])); }