check if compression is supported
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 14 Aug 2010 23:52:48 +0000 (01:52 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 14 Aug 2010 23:52:48 +0000 (01:52 +0200)
evolis-printer.pl

index 11bd8b7..54e2ceb 100755 (executable)
@@ -54,6 +54,8 @@ while(<>) {
                }
                $len == length $comp or warn "wrong length $len != ", length $comp;
 
+               die "compression not supported" unless $color =~ m/[ko]/;
+
                my $data;
                my $i = 0;
                while ( $i < length $comp ) {