mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-09 03:52:19 +02:00
Fixed strideof/alignof error
This commit is contained in:
parent
588d05767e
commit
02c2dfbb5c
1 changed files with 2 additions and 2 deletions
|
@ -398,7 +398,7 @@ namespace System.Collections
|
||||||
Free(oldPtr);
|
Free(oldPtr);
|
||||||
return;
|
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;
|
mSize += (.)addSpan.Length;
|
||||||
#if VERSION_LIST
|
#if VERSION_LIST
|
||||||
mVersion++;
|
mVersion++;
|
||||||
|
@ -567,7 +567,7 @@ namespace System.Collections
|
||||||
EnsureCapacity(size, true);
|
EnsureCapacity(size, true);
|
||||||
int addSize = size - mSize;
|
int addSize = size - mSize;
|
||||||
if (addSize > 0)
|
if (addSize > 0)
|
||||||
Internal.MemSet(Ptr + mSize, 0, addSize * alignof(T));
|
Internal.MemSet(Ptr + mSize, 0, addSize * strideof(T));
|
||||||
mSize = (.)size;
|
mSize = (.)size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue