summaryrefslogtreecommitdiffstats
path: root/src/storage/phrase_index.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/storage/phrase_index.cpp')
-rw-r--r--src/storage/phrase_index.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/storage/phrase_index.cpp b/src/storage/phrase_index.cpp
index 64eb649..0424b3a 100644
--- a/src/storage/phrase_index.cpp
+++ b/src/storage/phrase_index.cpp
@@ -361,7 +361,11 @@ bool SubPhraseIndex::merge(PhraseIndexLogger * logger){
PhraseItem olditem, newitem, item, * tmpitem;
while(logger->has_next_record()){
- logger->next_record(log_type, token, &oldchunk, &newchunk);
+ bool retval = logger->next_record
+ (log_type, token, &oldchunk, &newchunk);
+
+ if (!retval)
+ break;
switch(log_type){
case LOG_ADD_RECORD:{