Fix data dumping length bug.

This commit is contained in:
Jonathan Naylor
2017-02-28 08:25:23 +00:00
committed by GitHub
parent 1dbaec9331
commit 36eeb6c224

View File

@@ -1166,7 +1166,7 @@ RESP_TYPE_MMDVM CModem::getResponse()
// CUtils::dump(1U, "Received", m_buffer, m_length); // CUtils::dump(1U, "Received", m_buffer, m_length);
return RTM_OK; return RTM_OK;
} }
HW_TYPE CModem::getHWType() const HW_TYPE CModem::getHWType() const
@@ -1337,7 +1337,7 @@ void CModem::dumpSamples()
return; return;
} }
::fwrite(m_buffer + 6U, 1U, m_length, fp); ::fwrite(m_buffer + 6U, 1U, m_length - 6U, fp);
::fclose(fp); ::fclose(fp);
} }