Permalink
Browse files

fixed an error where brightness=0 toggled

  • Loading branch information...
teleshoes committed Jan 12, 2012
1 parent defe82b commit 8b382fa4034fca51afccf74e4e661e8424c5a294
Showing with 2 additions and 1 deletion.
  1. +2 −1 led-controls/led
View
@@ -43,7 +43,8 @@ if($name !~ /^([a-zA-Z0-9:_-]+)$/){
}
$name = $1; #untaint
-my $brightness = shift() || 'toggle';
+my $brightness = shift;
+$brightness = 'toggle' if not defined $brightness;
if(@ARGV > 0 or $brightness !~ /^(on|off|toggle|\d+)$/i){
die $usage;
}

0 comments on commit 8b382fa

Please sign in to comment.