diff options
Diffstat (limited to 'csharp/src/Google.Protobuf/FieldCodec.cs')
-rw-r--r-- | csharp/src/Google.Protobuf/FieldCodec.cs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/csharp/src/Google.Protobuf/FieldCodec.cs b/csharp/src/Google.Protobuf/FieldCodec.cs index 1076c2a9..15d52c7d 100644 --- a/csharp/src/Google.Protobuf/FieldCodec.cs +++ b/csharp/src/Google.Protobuf/FieldCodec.cs @@ -298,12 +298,8 @@ namespace Google.Protobuf uint tag; T value = codec.DefaultValue; - while (input.ReadTag(out tag)) + while ((tag = input.ReadTag()) != 0) { - if (tag == 0) - { - throw InvalidProtocolBufferException.InvalidTag(); - } if (tag == codec.Tag) { value = codec.Read(input); |