From ef7091c9eda6d4e02860c879d5b1cf7044fd144c Mon Sep 17 00:00:00 2001 From: csharptest Date: Tue, 7 May 2013 15:00:50 -0500 Subject: Issue #54: should retire all bytes in buffer (bufferSize) --- src/ProtocolBuffers/CodedInputStream.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/ProtocolBuffers/CodedInputStream.cs') diff --git a/src/ProtocolBuffers/CodedInputStream.cs b/src/ProtocolBuffers/CodedInputStream.cs index ab18f9d7..3ee7d55f 100644 --- a/src/ProtocolBuffers/CodedInputStream.cs +++ b/src/ProtocolBuffers/CodedInputStream.cs @@ -1780,7 +1780,11 @@ namespace Google.ProtocolBuffers { // Skipping more bytes than are in the buffer. First skip what we have. int pos = bufferSize - bufferPos; - totalBytesRetired += pos; + + // ROK 5/7/2013 Issue #54: should retire all bytes in buffer (bufferSize) + // totalBytesRetired += pos; + totalBytesRetired += bufferSize; + bufferPos = 0; bufferSize = 0; -- cgit v1.2.3