Forgot to use a wrapping multiply instead of a straight multiply.

This commit is contained in:
Nathan Vegdahl 2020-04-23 13:52:04 +09:00
parent 29fcc69ae1
commit 3ffaf7bee5

View File

@ -83,7 +83,7 @@ fn lk_scramble(mut n: u32, scramble: u32) -> u32 {
n = n.wrapping_add(hash(scramble, 2)); n = n.wrapping_add(hash(scramble, 2));
for &p in PERMS.iter() { for &p in PERMS.iter() {
n ^= n.wrapping_mul(p); n ^= n.wrapping_mul(p);
n += n << 1; n = n.wrapping_add(n << 1);
} }
n n
} }