Commit 0a0dd033 authored by csharptest's avatar csharptest Committed by rogerk

Fix for bug in limited input stream's Position, Introduced Position on output stream

parent 8c8a82a2
......@@ -166,7 +166,7 @@ namespace Google.ProtocolBuffers
get
{
if (input != null)
return input.Position - (bufferSize - bufferPos);
return input.Position - ((bufferSize + bufferSizeAfterLimit) - bufferPos);
return bufferPos;
}
}
......
......@@ -126,6 +126,19 @@ namespace Google.ProtocolBuffers
#endregion
/// <summary>
/// Returns the current position in the stream, or the position in the output buffer
/// </summary>
public long Position
{
get
{
if (output != null)
return output.Position + position;
return position;
}
}
void ICodedOutputStream.WriteMessageStart() { }
void ICodedOutputStream.WriteMessageEnd() { Flush(); }
......
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