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
+3 -1
@@ -327,7 +327,8 @@ void ring_buffer_base::reader_thread(bool is_forward) {
if (next_chunk > ring_end_) {
next_chunk = ring_pos_;
}
} else if (last_marker != ring_begin_) {
} else {
if (last_marker != ring_begin_) {
last_marker = ring_begin_;
next_chunk = ring_pos_;
}
@@ -335,6 +336,7 @@ void ring_buffer_base::reader_thread(bool is_forward) {
if (next_chunk > ring_begin_) {
--next_chunk;
}
}
if (read_state_[next_chunk % read_state_.size()]) {
if (get_stop_requested()) {