summaryrefslogtreecommitdiffhomepage
path: root/include/stc/cvec.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stc/cvec.h')
-rw-r--r--include/stc/cvec.h2
1 files changed, 1 insertions, 1 deletions
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