shithub: mc

Download patch

ref: c70655587600ffeb4c5821e2008bd2b97bb7698a
parent: aa7e3e0a6facd876fea2235ccb6f1ee27e016d3a
author: Ori Bernstein <[email protected]>
date: Wed Jan 29 15:43:04 EST 2014

Ensurespace() takes chunks, not bits.

    We were ensuring the wrong thing, which lead to crashes.

--- 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)
 	;;
 }