From: Chip Salzenberg Date: Tue, 19 Nov 1996 00:07:25 +0000 (+1200) Subject: Fix undef warning in Math::BigInt X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8b6a6e55c8aee2cca22dc5eb0d7dfb73f878584c;p=p5sagit%2Fp5-mst-13.2.git Fix undef warning in Math::BigInt --- diff --git a/lib/Math/BigInt.pm b/lib/Math/BigInt.pm index f76f261..422dca4 100644 --- a/lib/Math/BigInt.pm +++ b/lib/Math/BigInt.pm @@ -214,7 +214,7 @@ sub mul { #(*int_num_array, *int_num_array) return int_num_array for $x (@x) { ($car, $cty) = (0, $[); for $y (@y) { - $prod = $x * $y + $prod[$cty] + $car; + $prod = $x * $y + ($prod[$cty] || 0) + $car; $prod[$cty++] = $prod - ($car = int($prod * 1e-5)) * 1e5; }