Fix bug in growable bitset. Always insert 0xAA in malloc on testing.

This commit is contained in:
Christoffer Lerno
2023-10-09 14:23:41 +02:00
parent 6b571fe427
commit b7a896805d
2 changed files with 7 additions and 1 deletions

View File

@@ -139,7 +139,7 @@ fn bool GrowableBitSet.get(&self, usz i) @operator([]) @inline
fn usz GrowableBitSet.len(&self) @operator(len)
{
usz n = self.data.len() * BITS;
if (n > 0) n -= (usz)self.data[n - 1].ctz() - 1;
if (n > 0) n -= (usz)self.data[^1].clz();
return n;
}