diff --git a/perllib/phash.ph b/perllib/phash.ph index 936978a5..8142c4ef 100644 --- a/perllib/phash.ph +++ b/perllib/phash.ph @@ -146,7 +146,7 @@ sub gen_perfect_hash($) { # Minimal power of 2 value for N with enough wiggle room. # The scaling constant must be larger than 0.5 in order for the # algorithm to ever terminate. - my $room = scalar(@keys)*0.8; + my $room = int(scalar(@keys)*0.8); $n = 1; while ($n < $room) { $n <<= 1;