From e89d81e318ee8873bc6b9ad71e07ea768a8276ee Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Thu, 20 Jun 2013 14:26:17 +0100 Subject: [PATCH] [btree] fix bug in earlier patch. inc_children was always begin called. --- persistent-data/data-structures/btree.tcc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/persistent-data/data-structures/btree.tcc b/persistent-data/data-structures/btree.tcc index 743a028..422d2b9 100644 --- a/persistent-data/data-structures/btree.tcc +++ b/persistent-data/data-structures/btree.tcc @@ -694,7 +694,8 @@ namespace persistent_data { for (;;) { inc = spine.step(block); - inc_children(spine, leaf_rc); + if (inc) + inc_children(spine, leaf_rc); // patch up the parent to point to the new shadow if (spine.has_parent()) {