Skip to content

Commit 0d24845

Browse files
committed
fixed bug in hit buffer
1 parent f1db13a commit 0d24845

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/search/hit_buffer.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,13 @@ struct HitBuffer
189189
if (config.trace_pt_membuf || config.swipe_all) {
190190
if (bins_processed_ >= bins())
191191
return std::tuple<Hit*, size_t, Key, Key> { nullptr, 0, 0, 0 };
192-
auto& buf = hit_buf_[bins_processed_];
193192
++bins_processed_;
194193
if(config.swipe_all)
195194
return std::tuple<Hit*, size_t, Key, Key> { nullptr, 0, input_range_next_.first, input_range_next_.second };
196-
else
195+
else {
196+
auto& buf = hit_buf_[bins_processed_];
197197
return std::tuple<Hit*, size_t, Key, Key> { buf.data(), buf.size(), input_range_next_.first, input_range_next_.second };
198+
}
198199
}
199200
else {
200201
if (load_worker_) {

0 commit comments

Comments
 (0)