Skip to content

Commit

Permalink
Fix infinite while loop for unsigned int label query
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-dark committed Oct 6, 2023
1 parent 561c8b6 commit 05ca69e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tiledb/sm/query/readers/ordered_dim_label_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ IndexType OrderedDimLabelReader::search_for_range(

// Run a binary search.
Op cmp;
while (left_index < right_index - 1) {
while (left_index + 1 < right_index) {
// Check against mid.
IndexType mid = left_index + (right_index - left_index) / 2;
if (cmp(get_value_at<IndexType, LabelType>(mid, domain_low, tile_extent),
Expand Down

0 comments on commit 05ca69e

Please sign in to comment.