From 28c07d8fcfa37890026f5f0939c0caa824e47a12 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" <1+sgraves@noreply.localhost> Date: Tue, 27 Oct 2026 10:59:40 -0500 Subject: [PATCH] fix decrement handling --- .../src/file_manager/ring_buffer_base.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/repertory/librepertory/src/file_manager/ring_buffer_base.cpp b/repertory/librepertory/src/file_manager/ring_buffer_base.cpp index 503daa9..9d4b013 100644 --- a/repertory/librepertory/src/file_manager/ring_buffer_base.cpp +++ b/repertory/librepertory/src/file_manager/ring_buffer_base.cpp @@ -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()]) {