Skip to content

Commit 8fefa65

Browse files
committed
bugfix
1 parent ec1bf04 commit 8fefa65

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

negentropy/src/types.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ impl Accumulator {
210210

211211
let mut wtr = Vec::with_capacity(ID_SIZE);
212212

213-
for _ in 0..4 {
214-
let orig = Wrapping(u64::from_le_bytes(p[..8].try_into()?));
215-
let other_v = Wrapping(u64::from_le_bytes(po[..8].try_into()?));
213+
for i in 0..4 {
214+
let orig = Wrapping(u64::from_le_bytes(p[(i*8)..(i*8 + 8)].try_into()?));
215+
let other_v = Wrapping(u64::from_le_bytes(po[(i*8)..(i*8 + 8)].try_into()?));
216216

217217
let mut next = orig;
218218

0 commit comments

Comments
 (0)