summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChip Salzenberg <chip@perl.com>1996-11-19 12:07:25 +1200
committerChip Salzenberg <chip@atlantic.net>1997-04-09 00:00:00 +0000
commit8b6a6e55c8aee2cca22dc5eb0d7dfb73f878584c (patch)
treedec0ccf197033d3f8f7f61ac06ea110be596cfc0
parent0e505df1d74bd65a42a69dbec1b44eebf2bd0b93 (diff)
downloadperl-8b6a6e55c8aee2cca22dc5eb0d7dfb73f878584c.tar.gz
Fix undef warning in Math::BigInt
-rw-r--r--lib/Math/BigInt.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Math/BigInt.pm b/lib/Math/BigInt.pm
index f76f2611f0..422dca42fd 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;
}