Update py/ringbuf.c
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
This commit is contained in:
parent
ee8000050d
commit
6b872acab7
|
@ -30,7 +30,7 @@
|
||||||
bool ringbuf_init(ringbuf_t *r, uint8_t *buf, size_t capacity) {
|
bool ringbuf_init(ringbuf_t *r, uint8_t *buf, size_t capacity) {
|
||||||
r->heap = false;
|
r->heap = false;
|
||||||
r->buf = buf;
|
r->buf = buf;
|
||||||
r->size = capacity + 1;
|
r->size = capacity;
|
||||||
r->iget = r->iput = 0;
|
r->iget = r->iput = 0;
|
||||||
return r->buf != NULL;
|
return r->buf != NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue