Improve error reporting.
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 22 Jan 2007 14:04:33 +0000 (14:04 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Mon, 22 Jan 2007 14:04:33 +0000 (14:04 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@7135 cda61777-01e9-0310-a592-d414129be87e

icons/icon.pl

index b9cce7e..f746d69 100755 (executable)
@@ -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";
+                        $pixhex = sprintf "%02x%02x%02x", unpack "CCC", $pix;
+                       die "illegal colour value $pixhex at pixel ($x,$y) in $filename\n";
                    }
                    $currbyte |= $pal{$pix};
                }