1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-20 08:58:00 +02:00

Corlib fixes

This commit is contained in:
Brian Fiete 2020-06-10 05:44:27 -07:00
parent dce27867d3
commit a955361f6a
2 changed files with 8 additions and 1 deletions

View file

@ -289,7 +289,7 @@ namespace System.Collections
/// Adds an item to the back of the list.
public void Add(Span<T> addSpan)
{
if (mSize == AllocSize)
if (mSize + addSpan.Length > AllocSize)
{
let oldPtr = EnsureCapacity(mSize + addSpan.Length, false);
for (var val in ref addSpan)