Skip to content

Commit ea06afb

Browse files
committed
Fix for 16 and 32 bit systems.
1 parent 4e9cb21 commit ea06afb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightning/src/routing/router.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1528,7 +1528,7 @@ where L::Target: Logger {
15281528
let mut path_nonce = [0u8; 8];
15291529
path_nonce.copy_from_slice(&cur_node_id.as_slice()[..8]);
15301530
let mut prng = ChaCha20::new(random_seed_bytes, &path_nonce);
1531-
let mut random_path_bytes = [0u8; 8];
1531+
let mut random_path_bytes = [0u8; ::core::mem::size_of::<usize>()];
15321532

15331533
// Pick a random path length in [1 .. 3]
15341534
prng.process_in_place(&mut random_path_bytes);

0 commit comments

Comments
 (0)