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

Commit 2135a62

Browse files
dotnet-botsafern
authored andcommitted
Fixing build by casting IntPtr to nint. (dotnet/coreclr#15530)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com> Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
1 parent a9155cf commit 2135a62

File tree

1 file changed

+1
-1
lines changed
  • src/Common/src/CoreLib/Internal/Runtime/CompilerServices

1 file changed

+1
-1
lines changed

src/Common/src/CoreLib/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)