Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Prev Previous commit
Next Next commit
Update RuntimeExports.cs
Co-authored-by: Jan Kotas <[email protected]>
  • Loading branch information
jkoritzinsky and jkotas authored Apr 3, 2024
commit db96ac7bcf43a186506dc58809e31e5f2a8845f7
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ public static unsafe object RhNewArray(MethodTable* pEEType, int length)
public static unsafe object RhBox(MethodTable* pEEType, ref byte data)
{
// A null can be passed for boxing of a null ref.
if (Unsafe.IsNullRef(ref data))
throw new NullReferenceException();
_ = Unsafe.ReadUnaligned<byte>(ref data);

ref byte dataAdjustedForNullable = ref data;

Expand Down