File tree 1 file changed +2
-2
lines changed
src/libraries/System.Private.CoreLib/src/System/Runtime/InteropServices
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ public void ReadSpan<T>(ulong byteOffset, Span<T> buffer)
246
246
ref T structure = ref MemoryMarshal . GetReference ( buffer ) ;
247
247
for ( int i = 0 ; i < buffer . Length ; i ++ )
248
248
{
249
- Unsafe . Add ( ref structure , i ) = Unsafe. ReadUnaligned < T > ( ptr + alignedSizeofT * i ) ;
249
+ Unsafe . Add ( ref structure , ( nint ) ( uint ) i ) = Unsafe. ReadUnaligned < T > ( ptr + ( nuint ) alignedSizeofT * ( uint ) i ) ;
250
250
}
251
251
}
252
252
finally
@@ -335,7 +335,7 @@ public void WriteSpan<T>(ulong byteOffset, ReadOnlySpan<T> data)
335
335
ref T structure = ref MemoryMarshal . GetReference ( data ) ;
336
336
for ( int i = 0 ; i < data . Length ; i ++ )
337
337
{
338
- Unsafe . WriteUnaligned ( ptr + alignedSizeofT * i , Unsafe . Add ( ref structure , i ) ) ;
338
+ Unsafe . WriteUnaligned ( ptr + ( nuint ) alignedSizeofT * ( uint ) i , Unsafe . Add ( ref structure , ( nint ) ( uint ) i ) ) ;
339
339
}
340
340
}
341
341
finally
You can’t perform that action at this time.
0 commit comments