mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 09:16:20 +00:00
Probably fix bug #51602: MQTT Ring buffer 'get'
Rollover of get index was wrong
This commit is contained in:
parent
ff03ae6f55
commit
ca76c302f1
@ -204,7 +204,7 @@ mqtt_ringbuf_advance_get_idx(struct mqtt_ringbuf_t *rb, u16_t len)
|
||||
LWIP_ASSERT("mqtt_ringbuf_advance_get_idx: len < MQTT_OUTPUT_RINGBUF_SIZE", len < MQTT_OUTPUT_RINGBUF_SIZE);
|
||||
|
||||
rb->get += len;
|
||||
if (rb->get > MQTT_OUTPUT_RINGBUF_SIZE) {
|
||||
if (rb->get >= MQTT_OUTPUT_RINGBUF_SIZE) {
|
||||
rb->get = rb->get - MQTT_OUTPUT_RINGBUF_SIZE;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user