aboutsummaryrefslogtreecommitdiff
path: root/icons
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2016-04-24 07:29:25 +0100
committerSimon Tatham <anakin@pobox.com>2016-04-24 07:29:25 +0100
commit02ce237f911f7b970ea9b093226a9e7d09fffbf4 (patch)
treeb5255642820438f4e2b374e41d9531ead6b9c06d /icons
parent9d15092e7fe618aef2a2e04b57df4e24462ed83f (diff)
downloadpuzzles-02ce237f911f7b970ea9b093226a9e7d09fffbf4.zip
puzzles-02ce237f911f7b970ea9b093226a9e7d09fffbf4.tar.gz
puzzles-02ce237f911f7b970ea9b093226a9e7d09fffbf4.tar.bz2
puzzles-02ce237f911f7b970ea9b093226a9e7d09fffbf4.tar.xz
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.
Diffstat (limited to 'icons')
-rwxr-xr-xicons/icon.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/icons/icon.pl b/icons/icon.pl
index b9cce7e..d0c5a8e 100755
--- a/icons/icon.pl
+++ b/icons/icon.pl
@@ -203,7 +203,8 @@ sub readicon {
$currbits += $depth;
if ($x < $w && defined ($pix = $data->[$y*$w+$x])) {
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};
}