From e9e405dbe1ec3eb51ce2e3398b3c24583293892e Mon Sep 17 00:00:00 2001 From: Tyge Lovset Date: Mon, 15 Aug 2022 08:30:31 +0200 Subject: Two more iter bugs fix. --- include/stc/cvec.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/stc/cvec.h') diff --git a/include/stc/cvec.h b/include/stc/cvec.h index 170bf741..92065619 100644 --- a/include/stc/cvec.h +++ b/include/stc/cvec.h @@ -169,7 +169,7 @@ _cx_memb(_insert_n)(_cx_self* self, const size_t idx, const _cx_value arr[], con } STC_INLINE _cx_iter _cx_memb(_insert_at)(_cx_self* self, _cx_iter it, i_key value) { - return _cx_memb(_insert_range)(self, it.ref, &value, &value + 1); + return _cx_memb(_insert_range)(self, (it.ref ? it.ref : it.end), &value, &value + 1); } STC_INLINE _cx_iter -- cgit v1.2.3