diff options
Diffstat (limited to 'lib/bigint.pl')
-rw-r--r-- | lib/bigint.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bigint.pl b/lib/bigint.pl index a274736e44..bfd2efa88c 100644 --- a/lib/bigint.pl +++ b/lib/bigint.pl @@ -168,11 +168,11 @@ sub add { #(int_num_array, int_num_array) return int_num_array $car = 0; for $x (@x) { last unless @y || $car; - $x -= 1e5 if $car = (($x += shift(@y) + $car) >= 1e5); + $x -= 1e5 if $car = (($x += shift(@y) + $car) >= 1e5) ? 1 : 0; } for $y (@y) { last unless $car; - $y -= 1e5 if $car = (($y += $car) >= 1e5); + $y -= 1e5 if $car = (($y += $car) >= 1e5) ? 1 : 0; } (@x, @y, $car); } |