diff --git a/src/common/kiwix/reader.cpp b/src/common/kiwix/reader.cpp index 11adfe1b7..2e0f633fb 100644 --- a/src/common/kiwix/reader.cpp +++ b/src/common/kiwix/reader.cpp @@ -507,6 +507,7 @@ namespace kiwix { /* Reset the suggestions otherwise check if the suggestions number is less than the suggestionsCount */ if (reset) { this->suggestions.clear(); + this->suggestionsOffset = this->suggestions.begin(); } else { if (this->suggestions.size() > suggestionsCount) { return false; @@ -581,6 +582,7 @@ namespace kiwix { bool retVal; this->suggestions.clear(); + this->suggestionsOffset = this->suggestions.begin(); for (std::vector::iterator variantsItr = variants.begin(); variantsItr != variants.end(); variantsItr++) {