add assert before write khash del flags

This commit is contained in:
ksss
2014-04-09 23:11:37 +09:00
parent 90e1a4fb56
commit cf5aabeba1
+1
View File
@@ -193,6 +193,7 @@ kh_fill_flags(uint8_t *p, uint8_t c, size_t len)
void kh_del_##name(mrb_state *mrb, kh_##name##_t *h, khint_t x) \
{ \
(void)mrb; \
mrb_assert(x != h->n_buckets && !__ac_iseither(h->ed_flags, x)); \
h->ed_flags[x/4] |= __m_del[x%4]; \
h->size--; \
} \