fix decrement handling

This commit is contained in:
sgraves committed 2026-10-27 10:59:40 -05:00
1 parent a8715c8ec4
commit 28c07d8fcf
1 file changed
+8 -6
@@ -327,13 +327,15 @@ void ring_buffer_base::reader_thread(bool is_forward) {
if (next_chunk > ring_end_) {
next_chunk = ring_pos_;
}
} else if (last_marker != ring_begin_) {
last_marker = ring_begin_;
next_chunk = ring_pos_;
}
} else {
if (last_marker != ring_begin_) {
last_marker = ring_begin_;
next_chunk = ring_pos_;
}
if (next_chunk > ring_begin_) {
--next_chunk;
if (next_chunk > ring_begin_) {
--next_chunk;
}
}
if (read_state_[next_chunk % read_state_.size()]) {