]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Improve error reporting.
authorSimon Tatham <anakin@pobox.com>
Mon, 22 Jan 2007 14:04:33 +0000 (14:04 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 22 Jan 2007 14:04:33 +0000 (14:04 +0000)
[originally from svn r7135]

icons/icon.pl

index b9cce7e33e067f9acf6a84146ea54374c1969610..f746d69c9353e8a83320551a10510c8d29bbaaab 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};
                }