Permalink
Browse files

status_upd: protect against an empty list

  • Loading branch information...
Reini Urban
Reini Urban committed May 3, 2012
1 parent 9c12501 commit 1049b74d7832684d995a0e9ac027836bfc7a5d8a
Showing with 1 addition and 0 deletions.
  1. +1 −0 status_upd
View
@@ -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];

0 comments on commit 1049b74

Please sign in to comment.