diff options
Diffstat (limited to 'lib/lcm.c')
-rw-r--r-- | lib/lcm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/lcm.c b/lib/lcm.c index b9c8de461e9e..01b3aa922dda 100644 --- a/lib/lcm.c +++ b/lib/lcm.c @@ -7,7 +7,7 @@ unsigned long lcm(unsigned long a, unsigned long b) { if (a && b) - return (a * b) / gcd(a, b); + return (a / gcd(a, b)) * b; else if (b) return b; |