summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2013-02-03 12:37:37 +0100
committerJan Holesovsky <kendy@suse.cz>2013-02-03 12:37:37 +0100
commitdb5cfef4ebfacb50494a0b7bc8ca52d93a7aab49 (patch)
tree83b4aa02e98c197065a361e94ca0fcba8616c10e
parenta16616044711b2af07284edbb6b49facccc5fa20 (diff)
Dense B+ tree: Fix serious off-by-one problem.
Change-Id: I04fd003e01e7e781badce9b61c47b1281a6924ea
-rw-r--r--sw/inc/densebplustree.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/inc/densebplustree.cxx b/sw/inc/densebplustree.cxx
index 4ea38928aad8..825ae526e0f7 100644
--- a/sw/inc/densebplustree.cxx
+++ b/sw/inc/densebplustree.cxx
@@ -331,7 +331,7 @@ void DenseBPlusTree< Key, Value >::shiftNodes( const NodeWithIndex pParents[], i
for ( int p = nParentsLength - 1; p >= 0; --p )
{
const NodeWithIndex &rNode = pParents[ p ];
- for ( int i = rNode.nIndex + 1; i < rNode.pNode->m_nUsed - 1; ++i )
+ for ( int i = rNode.nIndex; i < rNode.pNode->m_nUsed - 1; ++i )
rNode.pNode->m_pKeys[ i ] += nHowMuch;
}
}