Skip to content

Commit

Permalink
nil pointer fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rach-id committed Jun 2, 2024
1 parent d538043 commit 95c3325
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,11 @@ func (proof Proof) VerifySubtreeRootInclusion(nth *NmtHasher, subtreeRoots [][]b
// if the leaf index falls within the proof range, pop and return a
// leaf
if proof.Start() <= start && start < proof.End() {
// advance the list of ranges
ranges = ranges[1:]
if len(ranges) != 0 {
// advance the list of ranges
// TODO: investigate this
ranges = ranges[1:]
}
// advance leafHashes
return popIfNonEmpty(&subtreeRoots), nil
}
Expand Down

0 comments on commit 95c3325

Please sign in to comment.