From e19e53e373dda8415606f0074ae4e87d8acd0c83 Mon Sep 17 00:00:00 2001 From: kelson42 Date: Sat, 29 Jan 2011 20:59:30 +0000 Subject: [PATCH] Fix a small bug in the indexing code to avoid forgetting around 100 articler per ZIM file --- src/common/kiwix/indexer.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/common/kiwix/indexer.cpp b/src/common/kiwix/indexer.cpp index ba83248ca..1f50d93f2 100644 --- a/src/common/kiwix/indexer.cpp +++ b/src/common/kiwix/indexer.cpp @@ -66,7 +66,7 @@ namespace kiwix { this->indexNextPercentPre(); while(this->currentArticleOffset < thresholdOffset && - this->currentArticleOffset < this->lastArticleOffset) { + this->currentArticleOffset <= this->lastArticleOffset) { zim::Article currentArticle; @@ -76,7 +76,7 @@ namespace kiwix { } while (this->currentArticleOffset++ && currentArticle.isRedirect() && this->currentArticleOffset != this->lastArticleOffset); - + if (!currentArticle.isRedirect()) { /* Index the content */ @@ -114,8 +114,7 @@ namespace kiwix { this->indexNextPercentPost(); /* increment the offset and set returned value */ - if (this->currentArticleOffset < this->lastArticleOffset) { - this->currentArticleOffset++; + if (this->currentArticleOffset <= this->lastArticleOffset) { return true; } else { this->stopIndexing();