Fixing build by casting IntPtr to nint. (#15530)
authordotnet bot <dotnet-bot@dotnetfoundation.org>
Fri, 15 Dec 2017 01:28:39 +0000 (17:28 -0800)
committerAhson Khan <ahkha@microsoft.com>
Fri, 15 Dec 2017 01:28:39 +0000 (17:28 -0800)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
src/mscorlib/shared/Internal/Runtime/CompilerServices/Unsafe.cs

index 1aae162..cd3dd05 100644 (file)
@@ -121,7 +121,7 @@ namespace Internal.Runtime.CompilerServices
             typeof(T).ToString(); // Type token used by the actual method body
             throw new PlatformNotSupportedException();
 #else
-            return ref AddByteOffset(ref source, (IntPtr)(elementOffset * (nint)SizeOf<T>()));
+            return ref AddByteOffset(ref source, (IntPtr)((nint)elementOffset * (nint)SizeOf<T>()));
 #endif
         }