From 8901847acf5d6c8b4c2865c4b00dc8a1003cecdb Mon Sep 17 00:00:00 2001 From: Ricardo Markiewicz Date: Thu, 15 Sep 2005 04:26:21 +0000 Subject: [PATCH] Fix lectura de claves en nodos no-hojas --- src/btree.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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