mirror of
https://github.com/cberner/raptorq.git
synced 2024-06-27 09:19:02 +00:00
Fix panic on non-x86 platforms
This panic'ed because fused_addassign_mul_scalar does not support scalar=1, and it was used as the fallback
This commit is contained in:
parent
30ed32e720
commit
c134e5b93e
@ -86,7 +86,11 @@ pub fn fused_addassign_mul_scalar_binary(
|
||||
}
|
||||
|
||||
// TODO: write an optimized fallback that does call .to_octet_vec()
|
||||
return fused_addassign_mul_scalar(octets, &other.to_octet_vec(), scalar);
|
||||
if *scalar == Octet::one() {
|
||||
return add_assign(octets, &other.to_octet_vec());
|
||||
} else {
|
||||
return fused_addassign_mul_scalar(octets, &other.to_octet_vec(), scalar);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
|
||||
|
Loading…
Reference in New Issue
Block a user