Calculate the options length correctly in all cases.
This commit is contained in:
parent
0e9c26df64
commit
fe4171f974
|
@ -481,7 +481,7 @@ bool CDMRNetwork::writeOptions()
|
|||
::memcpy(buffer + 4U, m_id, 4U);
|
||||
::strcpy(buffer + 8U, m_options.c_str());
|
||||
|
||||
return write((unsigned char*)buffer, (unsigned int)::strlen(buffer));
|
||||
return write((unsigned char*)buffer, (unsigned int)m_options.length() + 8U);
|
||||
}
|
||||
|
||||
bool CDMRNetwork::writeConfig()
|
||||
|
|
Loading…
Reference in a new issue