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

Fixed strideof/alignof error

This commit is contained in:
Brian Fiete 2023-07-07 17:13:03 -04:00
parent 588d05767e
commit 02c2dfbb5c

View file

@ -398,7 +398,7 @@ namespace System.Collections
Free(oldPtr);
return;
}
Internal.MemCpy(mItems + mSize, addSpan.Ptr, addSpan.Length * alignof(T), alignof(T));
Internal.MemCpy(mItems + mSize, addSpan.Ptr, addSpan.Length * strideof(T), alignof(T));
mSize += (.)addSpan.Length;
#if VERSION_LIST
mVersion++;
@ -567,7 +567,7 @@ namespace System.Collections
EnsureCapacity(size, true);
int addSize = size - mSize;
if (addSize > 0)
Internal.MemSet(Ptr + mSize, 0, addSize * alignof(T));
Internal.MemSet(Ptr + mSize, 0, addSize * strideof(T));
mSize = (.)size;
}