diff options
Diffstat (limited to 'src/System.Private.CoreLib/shared/System/Text/UTF8Encoding.cs')
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Text/UTF8Encoding.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Text/UTF8Encoding.cs b/src/System.Private.CoreLib/shared/System/Text/UTF8Encoding.cs index 67f87c9b0..2ea509624 100644 --- a/src/System.Private.CoreLib/shared/System/Text/UTF8Encoding.cs +++ b/src/System.Private.CoreLib/shared/System/Text/UTF8Encoding.cs @@ -783,13 +783,13 @@ namespace System.Text // diffs two char pointers using unsigned arithmetic. The unsigned arithmetic // is good enough for us, and it tends to generate better code than the signed // arithmetic generated by default - unsafe private static int PtrDiff(char* a, char* b) + private static unsafe int PtrDiff(char* a, char* b) { return (int)(((uint)((byte*)a - (byte*)b)) >> 1); } // byte* flavor just for parity - unsafe private static int PtrDiff(byte* a, byte* b) + private static unsafe int PtrDiff(byte* a, byte* b) { return (int)(a - b); } |