Calculate the options length correctly in all cases.

This commit is contained in:
Jonathan Naylor 2016-11-11 13:22:01 +00:00 committed by GitHub
parent 0e9c26df64
commit fe4171f974

View file

@ -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()