Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.4.2
-
None
Description
Hi all,
I think there is a bug in QModbusDataUnit::setValue(qsizetype index, quint16 newValue)...
We should not check the size of the list of values, but check m_valueCount before assigning the newValue
inline void setValue(qsizetype index, quint16 newValue)
{
if (m_values.isEmpty() || index >= m_values.size())
return;
m_values[index] = newValue;
}
and initialize (resize) the list of values in the:
inline void setValueCount(qsizetype newCount) { m_valueCount = newCount; }
by adding m_values.resize(newCount);
Giampaolo