mirror of
https://github.com/matrix-construct/construct
synced 2025-01-14 00:34:18 +01:00
ircd::db: Fixes for reverse iteration.
This commit is contained in:
parent
703121f867
commit
1a35514653
2 changed files with 2 additions and 5 deletions
|
@ -175,7 +175,7 @@ ircd::db::cursor<d, tuple>::const_iterator_base<index_iterator>::const_iterator_
|
|||
}
|
||||
,invalid
|
||||
{
|
||||
!bool(this->idx) || !row.valid(this->idx->first)
|
||||
!this->idx || !row.valid(this->idx->first)
|
||||
}
|
||||
{
|
||||
if(invalid)
|
||||
|
|
|
@ -1800,10 +1800,7 @@ ircd::db::index::rbegin(const string_view &key,
|
|||
|
||||
opts |= get::NO_CACHE;
|
||||
if(seek(ret, key, opts))
|
||||
{
|
||||
while(seek(ret, pos::NEXT, opts));
|
||||
seek(ret, pos::PREV, opts);
|
||||
}
|
||||
seek(ret, pos::BACK, opts);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue