fix decrement handling
This commit is contained in:
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_) {
|
if (next_chunk > ring_end_) {
|
||||||
next_chunk = ring_pos_;
|
next_chunk = ring_pos_;
|
||||||
}
|
}
|
||||||
} else if (last_marker != ring_begin_) {
|
} else {
|
||||||
last_marker = ring_begin_;
|
if (last_marker != ring_begin_) {
|
||||||
next_chunk = ring_pos_;
|
last_marker = ring_begin_;
|
||||||
}
|
next_chunk = ring_pos_;
|
||||||
|
}
|
||||||
|
|
||||||
if (next_chunk > ring_begin_) {
|
if (next_chunk > ring_begin_) {
|
||||||
--next_chunk;
|
--next_chunk;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (read_state_[next_chunk % read_state_.size()]) {
|
if (read_state_[next_chunk % read_state_.size()]) {
|
||||||
|
|||||||
Reference in new issue
Block a user