Skip to content

Commit ef754bd

Browse files
wskozlowskiWojtek
andauthored
detach bugfix (#778)
Co-authored-by: Wojtek <wskozlowski@dbzero.io>
1 parent 324cf2f commit ef754bd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/dbzero/core/collections/full_text/FT_IndexIterator.hpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,10 @@ namespace db0
292292
void FT_IndexIterator<bindex_t, key_t, IndexKeyT>::detach()
293293
{
294294
if (!this->m_is_detached) {
295-
if (!this->m_iterator.is_end()) {
296-
this->m_detach_key = *(this->m_iterator);
297-
} else {
295+
if (this->m_force_end || this->m_iterator.is_end()) {
298296
this->m_detach_key = {};
297+
} else {
298+
this->m_detach_key = *(this->m_iterator);
299299
}
300300
this->m_iterator.reset();
301301
this->m_is_detached = true;

0 commit comments

Comments
 (0)