Handle premature eof in tree reader

This commit is contained in:
Kresten Krab Thorup 2012-05-06 19:48:38 +02:00
parent 2c195da15e
commit 0b8d035bda

View file

@ -321,6 +321,9 @@ read_node(File) ->
next_leaf_node(File) ->
case file:read(File, 6) of
eof ->
%% premature end-of-file
eof;
{ok, <<0:32, _:16>>} ->
eof;
{ok, <<Len:32, 0:16>>} ->