From 77d2a805b136287025d3f03446aa5485d791fc62 Mon Sep 17 00:00:00 2001 From: john30 Date: Sat, 21 Oct 2017 12:03:57 +0200 Subject: [PATCH] fix for input string suddenly vanishing on certain compiler versions (at least gcc (Ubuntu 5.4.0-6ubuntu1~16.04.5) 5.4.0 20160609) --- src/lib/ebus/data.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/ebus/data.cpp b/src/lib/ebus/data.cpp index abe022b9..b5fc07b6 100644 --- a/src/lib/ebus/data.cpp +++ b/src/lib/ebus/data.cpp @@ -761,9 +761,9 @@ result_t ValueListDataField::writeSymbols(size_t offset, istringstream* input, } const char* str = input->str().c_str(); - for (const auto it : m_values) { - if (it.second.compare(str) == 0) { - return numType->writeRawValue(it.first, offset, m_length, output, usedLength); + for (map::const_iterator it = m_values.begin(); it != m_values.end(); ++it) { + if (it->second.compare(str) == 0) { + return numType->writeRawValue(it->first, offset, m_length, output, usedLength); } } char* strEnd = NULL; // fall back to raw value in input