diff --git a/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs b/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs index e173705da39c47..dced09c94df283 100644 --- a/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs +++ b/src/libraries/System.Runtime.Numerics/src/System/Numerics/BigInteger.cs @@ -384,7 +384,7 @@ public BigInteger(ReadOnlySpan value, bool isUnsigned = false, bool isBigE // The bytes parameter is in little-endian byte order. // We can just copy the bytes directly into the uint array. - value.Slice(0, wholeUInt32Count * 4).CopyTo(MemoryMarshal.AsBytes(val)); + value.Slice(0, wholeUInt32Count * 4).CopyTo(MemoryMarshal.AsBytes(val.AsSpan())); } // In both of the above cases on big-endian architecture, we need to perform