summaryrefslogtreecommitdiff
path: root/src/mscorlib/src/System/Text/EncoderNLS.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/src/System/Text/EncoderNLS.cs')
-rw-r--r--src/mscorlib/src/System/Text/EncoderNLS.cs11
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 2add017..95901e0 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);