Skip to content

Commit

Permalink
words64 reverse endianness check significant bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagofneto committed Oct 24, 2023
1 parent 9df8908 commit d77a8e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/types/words64.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,10 @@ fn bytes_used_u64(val: u64) -> usize {
// @return The reversed value
fn reverse_endianness_u64(input: u64, significant_bytes: Option<u32>) -> u64 {
let sb = match significant_bytes {
Option::Some(x) => x,
Option::Some(x) => {
assert(x <= 8, 'Invalid significant bytes');
x
},
Option::None(()) => 8
};

Expand Down

0 comments on commit d77a8e6

Please sign in to comment.