Update py/ringbuf.c

Co-authored-by: Scott Shawcroft <scott@tannewt.org>
This commit is contained in:
EmergReanimator 2022-01-07 21:18:51 +01:00 committed by GitHub
parent ee8000050d
commit 6b872acab7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@
bool ringbuf_init(ringbuf_t *r, uint8_t *buf, size_t capacity) {
r->heap = false;
r->buf = buf;
r->size = capacity + 1;
r->size = capacity;
r->iget = r->iput = 0;
return r->buf != NULL;
}