Skip to content

Commit

Permalink
check for self recurse to prevent stack overflow; fixes #9
Browse files Browse the repository at this point in the history
  • Loading branch information
richardlehane committed Sep 14, 2019
1 parent 1ca2a02 commit 9ab3773
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion file.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func (r *Reader) traverse() error {
return
}
file := r.direntries[i]
if file.leftSibID != noStream {
if file.leftSibID != noStream && int(file.leftSibID) != i {
recurse(int(file.leftSibID), path)
}
if len(r.File) >= cap(r.File) {
Expand Down

0 comments on commit 9ab3773

Please sign in to comment.