shithub: mc

Download patch

ref: c68209743f675fd934eba8e7d8e659ec2a63a253
parent: aa7e3e0a6facd876fea2235ccb6f1ee27e016d3a
author: Ori Bernstein <[email protected]>
date: Tue Jan 28 20:55:32 EST 2014

We were checking size in bits, but passing size in entries.

    Fix this, because we were allocating the slice 8 times too small.

--- a/libstd/bitset.myr
+++ b/libstd/bitset.myr
@@ -128,7 +128,7 @@
 }
 
 const ensurespace = {bs, v
-	if bs.bits.len*(8*sizeof(size)) <= v
+	if bs.bits.len <= v
 		bs.bits = slzgrow(bs.bits, v + 1)
 	;;
 }