From 72db206905fb169515a01ae75655adda3e105d70 Mon Sep 17 00:00:00 2001 From: Kresten Krab Thorup Date: Mon, 10 Sep 2012 00:23:33 +0200 Subject: [PATCH] Fix missing case in lookup_node Doing range fold on an empty store triggered this edge case. --- src/hanoidb_reader.erl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hanoidb_reader.erl b/src/hanoidb_reader.erl index d524318..10521bd 100644 --- a/src/hanoidb_reader.erl +++ b/src/hanoidb_reader.erl @@ -242,7 +242,10 @@ lookup_node(File,FromKey,#node{members=Members,level=N},_) -> end; not_found -> none - end. + end; +lookup_node(_,_,none,_) -> + none. + first_node(#index{file=File}) ->