diff options
author | Jiyoung Yun <jy910.yun@samsung.com> | 2017-02-10 20:35:12 +0900 |
---|---|---|
committer | Jiyoung Yun <jy910.yun@samsung.com> | 2017-02-10 20:35:12 +0900 |
commit | 4b11dc566a5bbfa1378d6266525c281b028abcc8 (patch) | |
tree | b48831a898906734f8884d08b6e18f1144ee2b82 /src/mscorlib/src/System/Text/EncoderNLS.cs | |
parent | db20f3f1bb8595633a7e16c8900fd401a453a6b5 (diff) | |
download | coreclr-upstream/1.0.0.9910.tar.gz coreclr-upstream/1.0.0.9910.tar.bz2 coreclr-upstream/1.0.0.9910.zip |
Imported Upstream version 1.0.0.9910upstream/1.0.0.9910
Diffstat (limited to 'src/mscorlib/src/System/Text/EncoderNLS.cs')
-rw-r--r-- | src/mscorlib/src/System/Text/EncoderNLS.cs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mscorlib/src/System/Text/EncoderNLS.cs b/src/mscorlib/src/System/Text/EncoderNLS.cs index 2add017d68..95901e01f4 100644 --- a/src/mscorlib/src/System/Text/EncoderNLS.cs +++ b/src/mscorlib/src/System/Text/EncoderNLS.cs @@ -5,7 +5,6 @@ namespace System.Text { using System.Runtime.Serialization; - using System.Security.Permissions; using System.Text; using System; using System.Diagnostics.Contracts; @@ -98,7 +97,7 @@ namespace System.Text // Just call the pointer version int result = -1; - fixed (char* pChars = chars) + fixed (char* pChars = &chars[0]) { result = GetByteCount(pChars + index, count, flush); } @@ -151,8 +150,8 @@ namespace System.Text bytes = new byte[1]; // Just call pointer version - fixed (char* pChars = chars) - fixed (byte* pBytes = bytes) + fixed (char* pChars = &chars[0]) + fixed (byte* pBytes = &bytes[0]) // Remember that charCount is # to decode, not size of array. return GetBytes(pChars + charIndex, charCount, @@ -212,9 +211,9 @@ namespace System.Text bytes = new byte[1]; // Just call the pointer version (can't do this for non-msft encoders) - fixed (char* pChars = chars) + fixed (char* pChars = &chars[0]) { - fixed (byte* pBytes = bytes) + fixed (byte* pBytes = &bytes[0]) { Convert(pChars + charIndex, charCount, pBytes + byteIndex, byteCount, flush, out charsUsed, out bytesUsed, out completed); |