From: Ricardo Markiewicz Date: Thu, 15 Sep 2005 04:26:21 +0000 (+0000) Subject: Fix lectura de claves en nodos no-hojas X-Git-Tag: 1_0-pre1~127 X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/commitdiff_plain/8901847acf5d6c8b4c2865c4b00dc8a1003cecdb?ds=inline Fix lectura de claves en nodos no-hojas --- diff --git a/src/btree.cpp b/src/btree.cpp index 4d28e49..e6c0cf4 100644 --- a/src/btree.cpp +++ b/src/btree.cpp @@ -250,6 +250,7 @@ std::list BTree::ReadKeys (uchar *node, BTreeNodeHeader &node_heade { std::list keys; node += sizeof (BTreeNodeHeader); + uint count = node_header.item_count; if (node_header.item_count == 0) return keys; @@ -258,9 +259,10 @@ std::list BTree::ReadKeys (uchar *node, BTreeNodeHeader &node_heade BTreeChildData *d = new BTreeChildData (node); node += d->Size (); keys.push_back (d); + count--; } - for (uint i=0; i