From: Sebastian B. <sb...@us...> - 2014-01-19 18:54:50
|
Update of /cvsroot/simplemail/simplemail In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25454 Modified Files: index_external.c Log Message: Use sibling to jump to next block if we are at a boundary. This fixes the index_external_unittest.c test. Index: index_external.c =================================================================== RCS file: /cvsroot/simplemail/simplemail/index_external.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- index_external.c 19 Jan 2014 18:54:28 -0000 1.48 +++ index_external.c 19 Jan 2014 18:54:47 -0000 1.49 @@ -777,7 +777,15 @@ text_len = strlen(text); if (index == iter->node->num_elements) - goto done; + { + if (iter->node->sibling == -1) + goto done; + + if (!bnode_read_block(idx, iter->node, iter->node->sibling)) + goto done; + + index = 0; + } be = bnode_get_ith_element_of_node(idx, iter->node, index); if (!(str = bnode_read_string(idx, be))) goto done; |