Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK committed Jan 24, 2020
1 parent 9847ddb commit bdf9f1a
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions csharp/src/Google.Protobuf/CodedInputReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,6 @@ public uint ReadTag()
// If we actually read a tag with a field of 0, that's not a valid tag.
ThrowInvalidTagException();
}
if (ReachedLimit)
{
return 0;
}

return lastTag;
}
Expand Down Expand Up @@ -1308,7 +1304,7 @@ private void ValidateRequestedDataAvaliable(int length)
if (length + reader.Consumed > currentLimit)
{
// Read to the end of the limit.
reader.Advance(currentLimit);
reader.Advance(Math.Min(currentLimit, reader.Remaining));
// Then fail.
ThrowTruncatedMessage();
}
Expand Down

0 comments on commit bdf9f1a

Please sign in to comment.