THRIFT-1120. csharp: proto.WriteListEnd being called in the wrong place
Patch: guoyunfeng
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1086260 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/generate/t_csharp_generator.cc b/compiler/cpp/src/generate/t_csharp_generator.cc
index 45ed646..93a39f9 100644
--- a/compiler/cpp/src/generate/t_csharp_generator.cc
+++ b/compiler/cpp/src/generate/t_csharp_generator.cc
@@ -1488,6 +1488,8 @@
generate_serialize_list_element(out, (t_list*)ttype, iter);
}
+ scope_down(out);
+
if (ttype->is_map()) {
indent(out) << "oprot.WriteMapEnd();" << endl;
} else if (ttype->is_set()) {
@@ -1497,7 +1499,6 @@
}
scope_down(out);
- scope_down(out);
}
void t_csharp_generator::generate_serialize_map_element(ofstream& out, t_map* tmap, string iter, string map) {