From: Alain Barbet Date: Wed, 20 Aug 2003 20:39:17 +0000 (+0200) Subject: Re: [perl #23463]: compiler version on sparc/netbsd X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=53f3fd80bed2bdd648b835eb98b97cad129ac8ff;p=p5sagit%2Fp5-mst-13.2.git Re: [perl #23463]: compiler version on sparc/netbsd Message-ID: <3F43C055.6030709@jupiter.alianet> p4raw-id: //depot/perl@20823 --- diff --git a/t/op/pack.t b/t/op/pack.t index 31e7b34..a0d8b7a 100755 --- a/t/op/pack.t +++ b/t/op/pack.t @@ -445,7 +445,7 @@ sub numbers_with_total { } else { $calc_sum = $total; # Shift into range by some multiple of the total - my $mult = int ($total / $max_p1); + my $mult = $max_p1 ? int ($total / $max_p1) : undef; # Need this to make sure that -1 + (~0+1) is ~0 (ie still integer) $calc_sum = $total - $mult; $calc_sum -= $mult * $max;