Bug fixes to D-Star.

This commit is contained in:
Jonathan Naylor 2016-02-02 19:54:51 +00:00
parent 3beaabd3dd
commit 9e5664ccc5
3 changed files with 20 additions and 42 deletions

View file

@ -89,9 +89,8 @@ CDStarHeader* CDStarSlowData::add(const unsigned char* data)
CCRC::addCCITT16(m_header, DSTAR_HEADER_LENGTH_BYTES);
// Compare them
if (crc[0U] != m_header[39U] || crc[1U] != m_header[40U]) {
m_header[39U] = 0x00U;
m_header[40U] = 0x00U;
if (::memcmp(crc, m_header + 39U, 2U) != 0) {
::memcpy(m_header + 39U, crc, 2U);
return NULL;
}