mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
Merge pull request #703 from RGafiyatullin/rgafiyatullin-factor-of-power-of-two
factor: panic running againts power of two. (issue #702)
This commit is contained in:
@@ -94,6 +94,9 @@ fn table_division(mut num: u64, factors: &mut Vec<u64>) {
|
||||
num /= 2;
|
||||
factors.push(2);
|
||||
}
|
||||
if num == 1 {
|
||||
return;
|
||||
}
|
||||
if is_prime(num) {
|
||||
factors.push(num);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user