queues and ring buffers: fix bug
queues and ring buffers: fix bug: a task in smol-software-harbor (Harbor dataset). The ring buffer in src/ring.c returns wrong values once the write position wraps around the end of the array ( make test reports failures). Find and fix the index arithmetic. Do not change the tests; run make -B…
The task
The ring buffer in `src/ring.c` returns wrong values once the write position wraps around the end of the array (`make test` reports failures). Find and fix the index arithmetic. Do not change the tests; run `make -B test`.
Part of efederici/smol-software-harbor.