diff options
| author | Tyge Lovset <[email protected]> | 2022-08-15 08:30:31 +0200 |
|---|---|---|
| committer | Tyge Lovset <[email protected]> | 2022-08-15 08:30:31 +0200 |
| commit | e9e405dbe1ec3eb51ce2e3398b3c24583293892e (patch) | |
| tree | 375d95de22e3483f17ebb5ab66fc3cd3392437fd /include/stc | |
| parent | 2cfad29db0fda313873f2b4a809ff60aca897785 (diff) | |
| download | STC-modified-e9e405dbe1ec3eb51ce2e3398b3c24583293892e.tar.gz STC-modified-e9e405dbe1ec3eb51ce2e3398b3c24583293892e.zip | |
Two more iter bugs fix.
Diffstat (limited to 'include/stc')
| -rw-r--r-- | include/stc/cdeq.h | 2 | ||||
| -rw-r--r-- | include/stc/cvec.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/stc/cdeq.h b/include/stc/cdeq.h index 1d75408c..128b85ee 100644 --- a/include/stc/cdeq.h +++ b/include/stc/cdeq.h @@ -125,7 +125,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 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 |
