[Groonga-commit] groonga/groonga [master] fixed a bug of grn::dat::Trie::repair().

Back to archive index

null+****@clear***** null+****@clear*****
2012年 1月 25日 (水) 16:41:33 JST


Susumu Yata	2012-01-25 16:41:33 +0900 (Wed, 25 Jan 2012)

  New Revision: b53ff3966f3a0a7f946707a3d6e0e3f586ec2204

  Log:
    fixed a bug of grn::dat::Trie::repair().

  Modified files:
    lib/dat/trie.cpp

  Modified: lib/dat/trie.cpp (+1 -1)
===================================================================
--- lib/dat/trie.cpp    2012-01-25 15:00:25 +0900 (3be2845)
+++ lib/dat/trie.cpp    2012-01-25 16:41:33 +0900 (6cfe884)
@@ -352,7 +352,7 @@ void Trie::build_from_trie(const Trie &trie, UInt32 src, UInt32 dest) {
 void Trie::repair_trie(const Trie &trie) {
   Vector<UInt32> valid_ids;
   header_->set_max_key_id(trie.max_key_id());
-  header_->set_next_key_id(trie.max_key_id());
+  header_->set_next_key_id(trie.max_key_id() + 1);
   UInt32 prev_invalid_key_id = INVALID_KEY_ID;
   for (UInt32 i = min_key_id(); i <= max_key_id(); ++i) {
     const Entry &entry = trie.ith_entry(i);




Groonga-commit メーリングリストの案内
Back to archive index