diff --git a/src/cluster/src/bvec.cpp b/src/cluster/src/bvec.cpp index 36e5430..586f108 100644 --- a/src/cluster/src/bvec.cpp +++ b/src/cluster/src/bvec.cpp @@ -13,7 +13,7 @@ bvec::bvec(vector& lengths, uint64_t bin_size) std::sort(std::begin(lengths), std::end(lengths)); for (uint64_t i = 0; i < lengths.size(); i += bin_size) { begin_bounds.push_back(lengths[i]); - uint64_t last_index = std::min(lengths.size() - 1, + uint64_t last_index = std::min((uint64_t)lengths.size() - 1, i + bin_size - 1); end_bounds.push_back(lengths[last_index]); //std::cout << "[" << i << " " << last_index << "]" << std::endl;