From 2b2b31cb3aae903a7208295cf6394343c59d4761 Mon Sep 17 00:00:00 2001 From: Wojtek Date: Mon, 1 Jun 2026 16:28:39 +0200 Subject: [PATCH] detach bugfix --- src/dbzero/core/collections/full_text/FT_IndexIterator.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dbzero/core/collections/full_text/FT_IndexIterator.hpp b/src/dbzero/core/collections/full_text/FT_IndexIterator.hpp index b175fb69..9b2ef37b 100644 --- a/src/dbzero/core/collections/full_text/FT_IndexIterator.hpp +++ b/src/dbzero/core/collections/full_text/FT_IndexIterator.hpp @@ -292,10 +292,10 @@ namespace db0 void FT_IndexIterator::detach() { if (!this->m_is_detached) { - if (!this->m_iterator.is_end()) { - this->m_detach_key = *(this->m_iterator); - } else { + if (this->m_force_end || this->m_iterator.is_end()) { this->m_detach_key = {}; + } else { + this->m_detach_key = *(this->m_iterator); } this->m_iterator.reset(); this->m_is_detached = true;