prolly fix

This commit is contained in:
Jakub Doka 2024-11-12 21:12:57 +01:00
parent dd51961fbb
commit b71031c146
No known key found for this signature in database
GPG key ID: C6E9A89936B8C143

View file

@ -125,7 +125,7 @@ impl BitSet {
let index = index as usize;
let (mut data, len) = self.data_mut_and_len();
if core::intrinsics::unlikely(index >= len) {
self.grow(index.next_power_of_two().max(4 * Self::UNIT));
self.grow((index + 1).next_power_of_two().max(4 * Self::UNIT));
(data, _) = self.data_mut_and_len();
}