diff options
author | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2015-08-05 17:16:13 -0700 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@users.noreply.github.com> | 2015-08-05 17:16:13 -0700 |
commit | ad8a889d1e1e2b0efd5b7579aa57ea5326cda6da (patch) | |
tree | 48e9e14f18ee1ff081df8d26a361665b9d458f74 /csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs | |
parent | 607940321c8ceeb80ec1099d94add8eef86825e5 (diff) | |
parent | 38032688a7faf4eef2cac392b9e69697a202fe62 (diff) | |
download | protobuf-ad8a889d1e1e2b0efd5b7579aa57ea5326cda6da.tar.gz protobuf-ad8a889d1e1e2b0efd5b7579aa57ea5326cda6da.tar.bz2 protobuf-ad8a889d1e1e2b0efd5b7579aa57ea5326cda6da.zip |
Merge pull request #692 from jskeet/tag-0
Change ReadTag/PeekTag behaviour to return 0 at EOF
Diffstat (limited to 'csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs')
-rw-r--r-- | csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs b/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs index 72bd16d4..ea8b1055 100644 --- a/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs +++ b/csharp/src/Google.Protobuf/WellKnownTypes/Struct.cs @@ -136,10 +136,8 @@ namespace Google.Protobuf.WellKnownTypes { public void MergeFrom(pb::CodedInputStream input) { uint tag; - while (input.ReadTag(out tag)) { + while ((tag = input.ReadTag()) != 0) { switch(tag) { - case 0: - throw pb::InvalidProtocolBufferException.InvalidTag(); default: if (pb::WireFormat.IsEndGroupTag(tag)) { return; @@ -391,10 +389,8 @@ namespace Google.Protobuf.WellKnownTypes { public void MergeFrom(pb::CodedInputStream input) { uint tag; - while (input.ReadTag(out tag)) { + while ((tag = input.ReadTag()) != 0) { switch(tag) { - case 0: - throw pb::InvalidProtocolBufferException.InvalidTag(); default: if (pb::WireFormat.IsEndGroupTag(tag)) { return; @@ -521,10 +517,8 @@ namespace Google.Protobuf.WellKnownTypes { public void MergeFrom(pb::CodedInputStream input) { uint tag; - while (input.ReadTag(out tag)) { + while ((tag = input.ReadTag()) != 0) { switch(tag) { - case 0: - throw pb::InvalidProtocolBufferException.InvalidTag(); default: if (pb::WireFormat.IsEndGroupTag(tag)) { return; |