diff --git a/k/utils/ring_buffer.c b/k/utils/ring_buffer.c index 7120ac3..fca3e90 100644 --- a/k/utils/ring_buffer.c +++ b/k/utils/ring_buffer.c @@ -2,7 +2,7 @@ uint8_t read_entry(struct ring_buffer *buf) { - if (buf->read >= buf->write) + if (buf->read == buf->write) return 0; uint8_t data = buf->buffer[buf->read];