From fd51fadaac768b166c4cd356eff72fe766bfbb46 Mon Sep 17 00:00:00 2001 From: Wouter van Oortmerssen Date: Mon, 18 Mar 2019 12:07:36 -0700 Subject: [PATCH] Fixed vector_delimited excluding delimiter Change-Id: I3e758d44b9845d6df91332bb609b4b7ad88659ac --- include/flatbuffers/minireflect.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/flatbuffers/minireflect.h b/include/flatbuffers/minireflect.h index 5fe16a4a9..ff14e3aa6 100644 --- a/include/flatbuffers/minireflect.h +++ b/include/flatbuffers/minireflect.h @@ -360,15 +360,15 @@ struct ToStringVisitor : public IterationVisitor { void Unknown(const uint8_t *) { s += "(?)"; } void StartVector() { s += "["; + s += d; if (vector_delimited) { - s += d; indent_level++; append_indent(); } } void EndVector() { + s += d; if (vector_delimited) { - s += d; indent_level--; append_indent(); } @@ -378,8 +378,8 @@ struct ToStringVisitor : public IterationVisitor { const TypeTable * /*type_table*/, const uint8_t * /*val*/) { if (i) { s += ","; + s += d; if (vector_delimited) { - s += d; append_indent(); } }