mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fix bug in growable bitset. Always insert 0xAA in malloc on testing.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user