Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantumExplorer committed Aug 20, 2024
1 parent 3e4f6d5 commit 3de4649
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions merk/src/proofs/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ impl SubqueryBranch {
return None;
}
let subquery_path_depth = self.subquery_path.as_ref().map_or(Some(0), |path| {
if path.len() > u16::MAX as usize {
let path_len = path.len();
if path_len > u16::MAX as usize {
None
} else {
Some(path.len() as u16)
Some(path_len as u16)
}
})?;
let subquery_depth = self.subquery.as_ref().map_or(Some(0), |query| {
Expand Down

0 comments on commit 3de4649

Please sign in to comment.