summaryrefslogtreecommitdiff
path: root/libstd/bitset.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-01-29 01:55:32 -0500
committerOri Bernstein <ori@eigenstate.org>2014-01-29 01:55:32 -0500
commitc68209743f675fd934eba8e7d8e659ec2a63a253 (patch)
treec31404dc04ff62ceb5b5602e48f5c32b3cbf73ef /libstd/bitset.myr
parentaa7e3e0a6facd876fea2235ccb6f1ee27e016d3a (diff)
downloadmc-c68209743f675fd934eba8e7d8e659ec2a63a253.tar.gz
We were checking size in bits, but passing size in entries.
Fix this, because we were allocating the slice 8 times too small.
Diffstat (limited to 'libstd/bitset.myr')
-rw-r--r--libstd/bitset.myr2
1 files changed, 1 insertions, 1 deletions
diff --git a/libstd/bitset.myr b/libstd/bitset.myr
index fb7033e..f022880 100644
--- a/libstd/bitset.myr
+++ b/libstd/bitset.myr
@@ -128,7 +128,7 @@ const bseq = {a, b
}
const ensurespace = {bs, v
- if bs.bits.len*(8*sizeof(size)) <= v
+ if bs.bits.len <= v
bs.bits = slzgrow(bs.bits, v + 1)
;;
}