diff --git a/lib/math.c b/lib/math.c index 5268663..58c09f4 100644 --- a/lib/math.c +++ b/lib/math.c @@ -13,7 +13,7 @@ long square(uint num) { long sum = num - 1; while(num > 0) { sum += num*2; - sum--; + num--; } return sum + 1; }