Skip to content

Commit

Permalink
status_upd: protect against an empty list
Browse files Browse the repository at this point in the history
  • Loading branch information
Reini Urban committed May 3, 2012
1 parent 9c12501 commit 1049b74
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions status_upd
Expand Up @@ -173,6 +173,7 @@ sub all_common {
delete $h->{$_[0]}->{''};
return $h->{$_[0]};
}
return {} unless @_;
# init with shortest list, sort hash by least number of keys
my @p = sort { h_size($h->{$a}) <=> h_size($h->{$b}) } @_;
my $pivot = $p[0];
Expand Down

0 comments on commit 1049b74

Please sign in to comment.