1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-24 18:48:01 +02:00

Generic CopyTo length fix

This commit is contained in:
Brian Fiete 2024-08-25 16:34:12 -04:00
parent 9f7793a870
commit 5a31cc35ba

View file

@ -389,7 +389,7 @@ namespace System
Debug.Assert((uint)srcOffset <= (uint)mLength);
Debug.Assert((uint)length <= (uint)destination.Length);
var ptr = destination.[Friend]mPtr;
for (int i = 0; i < destination.[Friend]mLength; i++)
for (int i = 0; i < length; i++)
ptr[i] = (T2)GetRef(i + srcOffset);
}
@ -400,7 +400,7 @@ namespace System
Debug.Assert((uint)srcOffset + (uint)length <= (uint)mLength);
Debug.Assert((uint)length <= (uint)destination.Length);
var ptr = destination.[Friend]mPtr;
for (int i = 0; i < destination.[Friend]mLength; i++)
for (int i = 0; i < length; i++)
ptr[i] = (T2)GetRef(i + srcOffset);
}