Skip to content

Commit

Permalink
Insert ReachedTagLimit check on ReadTag to return 0 on last tag
Browse files Browse the repository at this point in the history
  • Loading branch information
ObsidianMinor committed Oct 25, 2018
1 parent 8a43b56 commit 1048bf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion csharp/src/Google.Protobuf/CodedInputStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public uint ReadTag()
// If we actually read a tag with a field of 0, that's not a valid tag.
throw InvalidProtocolBufferException.InvalidTag();
}
if (ReachedLimit)
if (ReachedLimit || ReachedTagLimit)
{
return 0;
}
Expand Down

0 comments on commit 1048bf0

Please sign in to comment.