Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 264f814

Browse files
dotnet-botahsonkhan
authored andcommitted
Fixing build by casting IntPtr to nint. (#15530)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
1 parent a9bbada commit 264f814

File tree

1 file changed

+1
-1
lines changed
  • src/mscorlib/shared/Internal/Runtime/CompilerServices

1 file changed

+1
-1
lines changed

src/mscorlib/shared/Internal/Runtime/CompilerServices/Unsafe.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public static ref T Add<T>(ref T source, IntPtr elementOffset)
121121
typeof(T).ToString(); // Type token used by the actual method body
122122
throw new PlatformNotSupportedException();
123123
#else
124-
return ref AddByteOffset(ref source, (IntPtr)(elementOffset * (nint)SizeOf<T>()));
124+
return ref AddByteOffset(ref source, (IntPtr)((nint)elementOffset * (nint)SizeOf<T>()));
125125
#endif
126126
}
127127

0 commit comments

Comments
 (0)