Commit 211a844d authored by Marc Gravell's avatar Marc Gravell

another attempt at fixing #875

parent c14be682
......@@ -783,7 +783,7 @@ private unsafe void WriteRaw(PipeWriter writer, string value, int expectedLength
bool completed;
fixed (byte* bPtr = &MemoryMarshal.GetReference(span))
{
outEncoder.Convert(cPtr + charOffset, span.Length, bPtr, span.Length, final, out charsUsed, out bytesUsed, out completed);
outEncoder.Convert(cPtr + charOffset, charsRemaining, bPtr, span.Length, final, out charsUsed, out bytesUsed, out completed);
}
writer.Advance(bytesUsed);
totalBytes += bytesUsed;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment