Skip to content

Commit

Permalink
Calculate the options length correctly in all cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
g4klx authored Nov 11, 2016
1 parent 0e9c26d commit fe4171f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DMRNetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit fe4171f

Please sign in to comment.