This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
57481f5
)
Re: [perl #24398] Benchmark.pm cmpthese segfault
author
Stas Bekman
<stas@stason.org>
Wed, 5 Nov 2003 00:50:25 +0000
(16:50 -0800)
committer
Rafael Garcia-Suarez
<rgarciasuarez@gmail.com>
Wed, 5 Nov 2003 20:38:09 +0000
(20:38 +0000)
Message-ID: <
3FA8B9D1
.2020806@stason.org>
p4raw-id: //depot/perl@21671
lib/Benchmark.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Benchmark.pm
b/lib/Benchmark.pm
index
c472d58
..
6129828
100644
(file)
--- a/
lib/Benchmark.pm
+++ b/
lib/Benchmark.pm
@@
-890,7
+890,7
@@
sub cmpthese{
@vals = sort { $a->[7] <=> $b->[7] } @vals;
# If more than half of the rates are greater than one...
- my $display_as_rate =
$vals[$#vals>>1]->[7] > 1
;
+ my $display_as_rate =
@vals ? ($vals[$#vals>>1]->[7] > 1) : 0
;
my @rows;
my @col_widths;