mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 07:49:52 +03:00
fix uart out of bounds warning
This commit is contained in:
@@ -67,9 +67,11 @@ void IRAM_ATTR EMSuart::emsuart_rx_intr_handler(void * para) {
|
||||
drop_next_rx_ = true; // we have a overflow
|
||||
}
|
||||
}
|
||||
if (length > 0 && length < EMS_MAXBUFFERSIZE) {
|
||||
if (rxbuf[length - 1]) { // check if last byte is break
|
||||
length++;
|
||||
}
|
||||
}
|
||||
if ((!drop_next_rx_) && ((length == 2) || (length > 4))) {
|
||||
int baseType = 0;
|
||||
xRingbufferSendFromISR(buf_handle_, rxbuf, length - 1, &baseType);
|
||||
|
||||
Reference in New Issue
Block a user