Stop TX buffer overflows.

This commit is contained in:
Jonathan Naylor 2016-05-10 18:11:31 +01:00
parent 90ff130c51
commit c509f11c2a
6 changed files with 9 additions and 9 deletions

View file

@ -266,7 +266,7 @@ void CDStarTX::process()
if (m_poLen > 0U) {
uint16_t space = io.getSpace();
while (space > (8U * DSTAR_RADIO_BIT_LENGTH) && space < 1000U) {
while (space > (8U * DSTAR_RADIO_BIT_LENGTH) && space <= TX_RINGBUFFER_SIZE) {
uint8_t c = m_poBuffer[m_poPtr++];
writeByte(c);