Handle the "SHADE nnn" special with just one number.

Pointed out by hymie@lactose.homelinux.net
This commit is contained in:
Dianne Skoll
2016-01-15 10:16:02 -05:00
parent 81749ac1c9
commit 6d3b8f7a09

View File

@@ -256,6 +256,9 @@ sub parse_input
if ($body =~ /(\d+)\s+(\d+)\s+(\d+)/) {
$shades->[$d] = sprintf("#%02X%02X%02X",
($1 % 256), ($2 % 256), ($3 % 256));
} elsif ($body =~ /(\d+)/) {
$shades->[$d] = sprintf("#%02X%02X%02X",
($1 % 256), ($1 % 256), ($1 % 256));
}
} elsif ($special eq 'COLOR' || $special eq 'COLOUR') {
if ($body =~ /(\d+)\s+(\d+)\s+(\d+)\s+(.*)$/) {