Sanity check the ring buffers.

This commit is contained in:
Jonathan Naylor 2016-06-13 19:47:45 +01:00
parent a381387c5c
commit 0c635f5132
6 changed files with 24 additions and 10 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 <= TX_RINGBUFFER_SIZE) {
while (space > (8U * DSTAR_RADIO_BIT_LENGTH)) {
uint8_t c = m_poBuffer[m_poPtr++];
writeByte(c);