diff options
Diffstat (limited to 'csharp/src/Google.Protobuf/Collections/MapField.cs')
-rw-r--r-- | csharp/src/Google.Protobuf/Collections/MapField.cs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/csharp/src/Google.Protobuf/Collections/MapField.cs b/csharp/src/Google.Protobuf/Collections/MapField.cs index fed3d062..5eb2c2fc 100644 --- a/csharp/src/Google.Protobuf/Collections/MapField.cs +++ b/csharp/src/Google.Protobuf/Collections/MapField.cs @@ -627,12 +627,8 @@ namespace Google.Protobuf.Collections public void MergeFrom(CodedInputStream input) { uint tag; - while (input.ReadTag(out tag)) + while ((tag = input.ReadTag()) != 0) { - if (tag == 0) - { - throw InvalidProtocolBufferException.InvalidTag(); - } if (tag == codec.keyCodec.Tag) { Key = codec.keyCodec.Read(input); |