From 287b151b7b4ddd9d5a8f47c2f84c71c3e3804cf7 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 5 Feb 2012 20:33:46 +0100 Subject: [PATCH] repeat should start with 0 --- ZPL2pbm.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ZPL2pbm.pl b/ZPL2pbm.pl index 8a7c2b7..796b721 100755 --- a/ZPL2pbm.pl +++ b/ZPL2pbm.pl @@ -35,7 +35,7 @@ while( $line ) { my $out; # ZPL decompress - my $repeat = 1; + my $repeat = 0; foreach my $p ( 0 .. length($data) - 1 ) { my $c = substr($data,$p,1); if ( $c eq ',' ) { @@ -50,7 +50,7 @@ while( $line ) { $out .= "1" x $l; } elsif ( $c eq ':' ) { $out .= length($out) > $w ? substr($out,-$w*2) : "00" x $w; - warn "# $p :\n"; + warn "# $p repeat last line\n"; } elsif ( $c eq 'z' ) { $repeat += 400; } elsif ( $c ge 'g' && $c le 'y' ) { -- 2.20.1