ref: 7e0b29380740aebbe6bee1cfb8a7863b57dfb847
parent: 7f82ae85a25733351d0d89f294a23f3afc6593eb
author: qwx <[email protected]>
date: Sat Mar 26 12:25:47 EDT 2022
vec: more sanity checking
--- a/vec.c
+++ b/vec.c
@@ -76,7 +76,7 @@
if(v->len <= 0)
return nil;
s = v->vl.next;
- assert(s != &v->vl);
+ assert(s != &v->vl && s->len > 0 && s->head - s->p < Shardsz * v->elsz);
return shardpop(v, s, 0);
}