Skip to content

Commit ab1fb35

Browse files
committed
Circular buffer: Iterate by item
1 parent acd69b4 commit ab1fb35

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/lib/circular_buffer.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ void circular_buffer_iterate(
9696

9797
size_t i = cb->tail;
9898
do {
99-
callback(&cb->buffer[i], data);
99+
callback(cb->buffer + i * cb->item_size, data);
100100
increment(cb, &i);
101101
} while (i != cb->head);
102102
}

0 commit comments

Comments
 (0)