summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Directory.Build.props4
-rw-r--r--src/System.Private.CoreLib/src/System/StubHelpers.cs2
2 files changed, 5 insertions, 1 deletions
diff --git a/Directory.Build.props b/Directory.Build.props
index 3efd9a363c..2082362adc 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -2,4 +2,8 @@
<PropertyGroup>
<CL_MPCount>$(NumberOfCores)</CL_MPCount>
</PropertyGroup>
+ <PropertyGroup>
+ <!-- Enables Strict mode for Roslyn compiler -->
+ <Features>strict</Features>
+ </PropertyGroup>
</Project>
diff --git a/src/System.Private.CoreLib/src/System/StubHelpers.cs b/src/System.Private.CoreLib/src/System/StubHelpers.cs
index 6d9e7a8cea..b8e34e0e6c 100644
--- a/src/System.Private.CoreLib/src/System/StubHelpers.cs
+++ b/src/System.Private.CoreLib/src/System/StubHelpers.cs
@@ -200,7 +200,7 @@ namespace System.StubHelpers
internal static unsafe void ConvertToManaged(StringBuilder sb, IntPtr pNative)
{
- if (pNative == null)
+ if (pNative == IntPtr.Zero)
return;
int nbBytes = StubHelpers.strlen((sbyte*)pNative);