Handle premature eof in tree reader
This commit is contained in:
parent
2c195da15e
commit
0b8d035bda
1 changed files with 3 additions and 0 deletions
|
@ -321,6 +321,9 @@ read_node(File) ->
|
||||||
|
|
||||||
next_leaf_node(File) ->
|
next_leaf_node(File) ->
|
||||||
case file:read(File, 6) of
|
case file:read(File, 6) of
|
||||||
|
eof ->
|
||||||
|
%% premature end-of-file
|
||||||
|
eof;
|
||||||
{ok, <<0:32, _:16>>} ->
|
{ok, <<0:32, _:16>>} ->
|
||||||
eof;
|
eof;
|
||||||
{ok, <<Len:32, 0:16>>} ->
|
{ok, <<Len:32, 0:16>>} ->
|
||||||
|
|
Loading…
Reference in a new issue