Fixed vector_delimited excluding delimiter

Change-Id: I3e758d44b9845d6df91332bb609b4b7ad88659ac
parent 11198f10
...@@ -360,15 +360,15 @@ struct ToStringVisitor : public IterationVisitor { ...@@ -360,15 +360,15 @@ struct ToStringVisitor : public IterationVisitor {
void Unknown(const uint8_t *) { s += "(?)"; } void Unknown(const uint8_t *) { s += "(?)"; }
void StartVector() { void StartVector() {
s += "["; s += "[";
if (vector_delimited) {
s += d; s += d;
if (vector_delimited) {
indent_level++; indent_level++;
append_indent(); append_indent();
} }
} }
void EndVector() { void EndVector() {
if (vector_delimited) {
s += d; s += d;
if (vector_delimited) {
indent_level--; indent_level--;
append_indent(); append_indent();
} }
...@@ -378,8 +378,8 @@ struct ToStringVisitor : public IterationVisitor { ...@@ -378,8 +378,8 @@ struct ToStringVisitor : public IterationVisitor {
const TypeTable * /*type_table*/, const uint8_t * /*val*/) { const TypeTable * /*type_table*/, const uint8_t * /*val*/) {
if (i) { if (i) {
s += ","; s += ",";
if (vector_delimited) {
s += d; s += d;
if (vector_delimited) {
append_indent(); append_indent();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment