mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +08:00
Calculate the options length correctly in all cases.
This commit is contained in:
@@ -481,7 +481,7 @@ bool CDMRNetwork::writeOptions()
|
|||||||
::memcpy(buffer + 4U, m_id, 4U);
|
::memcpy(buffer + 4U, m_id, 4U);
|
||||||
::strcpy(buffer + 8U, m_options.c_str());
|
::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()
|
bool CDMRNetwork::writeConfig()
|
||||||
|
|||||||
Reference in New Issue
Block a user