X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/8699d7e1ccbda4282f8ba693422f337be31d100b..8901847acf5d6c8b4c2865c4b00dc8a1003cecdb:/src/btree.cpp?ds=sidebyside 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