diff options
author | Tak <taktaktaktaktaktaktaktaktaktak@gmail.com> | 2011-04-30 13:50:34 +0400 |
---|---|---|
committer | Tak <taktaktaktaktaktaktaktaktaktak@gmail.com> | 2011-04-30 13:50:34 +0400 |
commit | 5a1e6555b4fe97f6b2097f7e1ad3eff0488b84ab (patch) | |
tree | 2b675d9b6fc7794e65139da9e777f487ece9c851 | |
parent | be16f11ebfd1e54e1120ad21a444932e422c18c1 (diff) |
Don't pass an invalid count for list initialization.
-rw-r--r-- | extras/ValaBinding/Parser/Afrodite.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extras/ValaBinding/Parser/Afrodite.cs b/extras/ValaBinding/Parser/Afrodite.cs index 5979d8eaf9..e1dabf9d09 100644 --- a/extras/ValaBinding/Parser/Afrodite.cs +++ b/extras/ValaBinding/Parser/Afrodite.cs @@ -793,7 +793,7 @@ namespace MonoDevelop.ValaBinding.Parser.Afrodite internal List<T> ToTypedList<T> (Func<IntPtr,T> factory) { - List<T> list = new List<T> (Count); + List<T> list = new List<T> (Math.Max (0, Count)); foreach (IntPtr item in this) { list.Add (factory (item)); } |