From 02c2dfbb5cdaa1c415702d4480edcb521fc1d2dd Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Fri, 7 Jul 2023 17:13:03 -0400 Subject: [PATCH] Fixed strideof/alignof error --- BeefLibs/corlib/src/Collections/List.bf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BeefLibs/corlib/src/Collections/List.bf b/BeefLibs/corlib/src/Collections/List.bf index 4f003795..1b04982f 100644 --- a/BeefLibs/corlib/src/Collections/List.bf +++ b/BeefLibs/corlib/src/Collections/List.bf @@ -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; }