From 0c0ea8e96796bdff9209d213fa1084cc9d47fa61 Mon Sep 17 00:00:00 2001 From: john30 Date: Sat, 8 Oct 2016 19:50:07 +0200 Subject: [PATCH] corrected dumping of value lists --- src/lib/ebus/data.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/ebus/data.cpp b/src/lib/ebus/data.cpp index fea73f35..c0ddcae8 100644 --- a/src/lib/ebus/data.cpp +++ b/src/lib/ebus/data.cpp @@ -552,9 +552,12 @@ void ValueListDataField::dump(ostream& output) output << FIELD_SEPARATOR; if (!m_dataType->dump(output, m_length)) { // no divisor appended for (map::iterator it = m_values.begin(); it != m_values.end(); it++) { + if (it != m_values.begin()) { + output << VALUE_SEPARATOR; + } output << static_cast(it->first) << "=" << it->second; } - } // TODO else does not fit into CSV format! + } // else: impossible since divisor is not allowed for ValueListDataField dumpString(output, m_unit); dumpString(output, m_comment); }