mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-21 16:05:44 -07:00
Improve 'illegal colour' error message in icon.pl.
It actually went off this morning, after an upgrade of ImageMagick, and I found that it contained both unprintable characters in the colour description and the wrong variable in the coordinate display.
This commit is contained in:
@ -203,7 +203,8 @@ sub readicon {
|
|||||||
$currbits += $depth;
|
$currbits += $depth;
|
||||||
if ($x < $w && defined ($pix = $data->[$y*$w+$x])) {
|
if ($x < $w && defined ($pix = $data->[$y*$w+$x])) {
|
||||||
if (!defined $pal{$pix}) {
|
if (!defined $pal{$pix}) {
|
||||||
die "illegal colour value $pix at pixel $i in $filename\n";
|
my $pixprintable = unpack "H*", $pix;
|
||||||
|
die "illegal colour value $pixprintable at pixel ($x,$y) in $filename\n";
|
||||||
}
|
}
|
||||||
$currbyte |= $pal{$pix};
|
$currbyte |= $pal{$pix};
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user