diff options
author | Jon Skeet <jonskeet@google.com> | 2015-08-04 11:26:48 +0100 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2015-08-05 07:09:41 +0100 |
commit | 9df2defa295e1a3b315ed2a88791db51ff1f53e7 (patch) | |
tree | 5a0b130c7e82321c99954c4e86e29983e88d3bb6 /src/google | |
parent | b6defa7c115a19d3671b2a6c5ebab2a471d273ea (diff) | |
download | protobuf-9df2defa295e1a3b315ed2a88791db51ff1f53e7.tar.gz protobuf-9df2defa295e1a3b315ed2a88791db51ff1f53e7.tar.bz2 protobuf-9df2defa295e1a3b315ed2a88791db51ff1f53e7.zip |
Consume unknown fields when parsing.
This is expected to be the cause of the conformance test failures.
Generated code in next commit.
Diffstat (limited to 'src/google')
-rw-r--r-- | src/google/protobuf/compiler/csharp/csharp_message.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_message.cc b/src/google/protobuf/compiler/csharp/csharp_message.cc index 6ea568ca..ea722455 100644 --- a/src/google/protobuf/compiler/csharp/csharp_message.cc +++ b/src/google/protobuf/compiler/csharp/csharp_message.cc @@ -428,7 +428,8 @@ void MessageGenerator::GenerateMergingMethods(io::Printer* printer) { " if (pb::WireFormat.IsEndGroupTag(tag)) {\n" " return;\n" " }\n" - " break;\n"); // Note: we're ignoring unknown fields here. + " input.ConsumeLastField();\n" // We're not storing the data, but we still need to consume it. + " break;\n"); for (int i = 0; i < fields_by_number().size(); i++) { const FieldDescriptor* field = fields_by_number()[i]; internal::WireFormatLite::WireType wt = |