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)

This commit is contained in:
john30
2017-10-21 12:03:57 +02:00
parent 46078f8c88
commit 77d2a805b1
+3 -3
View File
@@ -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<unsigned int, string>::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