diff options
| author | Tyge Løvset <[email protected]> | 2022-10-31 17:06:58 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2022-10-31 17:06:58 +0100 |
| commit | 11fe640c0c21a1ba1cca677be7b2d602f0bff4a9 (patch) | |
| tree | 45fda5602361e9d717e2d147be852eab7942022f | |
| parent | d4fb53311441be008fa5983adad72e151584c89a (diff) | |
| download | STC-modified-11fe640c0c21a1ba1cca677be7b2d602f0bff4a9.tar.gz STC-modified-11fe640c0c21a1ba1cca677be7b2d602f0bff4a9.zip | |
Anorter minor fix in clist_X_erase_range()
| -rw-r--r-- | include/stc/clist.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/stc/clist.h b/include/stc/clist.h index dc5afda4..82adcdf8 100644 --- a/include/stc/clist.h +++ b/include/stc/clist.h @@ -333,10 +333,10 @@ _cx_memb(_erase_at)(_cx_self* self, _cx_iter it) { STC_DEF _cx_iter _cx_memb(_erase_range)(_cx_self* self, _cx_iter it1, _cx_iter it2) { _cx_node *end = it2.ref ? _clist_tonode(it2.ref) : self->last->next; - if (it1.ref) while (it1.prev->next != end) { + if (it1.ref != it2.ref) do { _cx_memb(_erase_node_after)(self, it1.prev); if (!self->last) break; - } + } while (it1.prev->next != end); return it2; } |
