Fix backported change from branch.
@@ -9,7 +9,7 @@ void ringbuf_reset(ringbuf_t *buf) {
static void produce(ringbuf_t *buf, unsigned bytes) {
assert(buf->count + bytes <= buf->size);
- buf->count -= bytes;
+ buf->count += bytes;
buf->head += bytes;
if (buf->head >= buf->size)
buf->head = 0;
