Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Correct the count so we deserialize properly

  • Loading branch information...
commit 2d917005cc80ce43b6b925bf90169a6288852acb 1 parent 9ded66c
@nealef nealef authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  mcs/class/System.Core/System.Collections.Generic/HashSet.cs
View
2  mcs/class/System.Core/System.Collections.Generic/HashSet.cs
@@ -582,7 +582,7 @@ public virtual void GetObjectData (SerializationInfo info, StreamingContext cont
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[]));
}
Please sign in to comment.
Something went wrong with that request. Please try again.