Skip to content

Commit

Permalink
fix: Words64 into u256 empty words
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagofneto committed Oct 27, 2023
1 parent 1cfbefb commit 20a3fbb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils/types/words64.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ impl Words64TryIntoU256LE of TryInto<Words64, u256> {
return Option::None(());
}

if self.len() == 0 {
return Option::Some(0);
}

let pows = array![
0x10000000000000000, // 2 ** 64
0x100000000000000000000000000000000, // 2 ** 128
Expand Down

0 comments on commit 20a3fbb

Please sign in to comment.