aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/google/protobuf/compiler/csharp/csharp_message.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/google/protobuf/compiler/csharp/csharp_message.cc b/src/google/protobuf/compiler/csharp/csharp_message.cc
index ea722455..40c13de5 100644
--- a/src/google/protobuf/compiler/csharp/csharp_message.cc
+++ b/src/google/protobuf/compiler/csharp/csharp_message.cc
@@ -417,13 +417,11 @@ void MessageGenerator::GenerateMergingMethods(io::Printer* printer) {
printer->Indent();
printer->Print(
"uint tag;\n"
- "while (input.ReadTag(out tag)) {\n"
+ "while ((tag = input.ReadTag()) != 0) {\n"
" switch(tag) {\n");
printer->Indent();
printer->Indent();
printer->Print(
- "case 0:\n" // 0 signals EOF / limit reached
- " throw pb::InvalidProtocolBufferException.InvalidTag();\n"
"default:\n"
" if (pb::WireFormat.IsEndGroupTag(tag)) {\n"
" return;\n"