From bf106665785f0d4656444e1ca3aca53b4ead29f0 Mon Sep 17 00:00:00 2001 From: Lander Gallastegi Date: Sun, 8 Jun 2025 01:34:02 +0200 Subject: [PATCH] Inclusion fix --- src/common/bit_array.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/bit_array.h b/src/common/bit_array.h index e0322cab0..268880f62 100644 --- a/src/common/bit_array.h +++ b/src/common/bit_array.h @@ -262,9 +262,9 @@ public: } return Range{find_start_bit(index - 1), end_bit}; }; - const size_t end_word = (end - 1) / BITS_PER_WORD; + const size_t end_word = ((end - 1) / BITS_PER_WORD) + 1; const size_t end_bit = (end - 1) % BITS_PER_WORD; - u64 masked_last = data[end_word]; + u64 masked_last = data[end_word - 1]; if (end_bit < BITS_PER_WORD - 1) { masked_last &= (1ULL << (end_bit + 1)) - 1; }