validator/httpd/cgi-bin check,1.538,1.539

Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv10039

Modified Files:
	check 
Log Message:
fixing a bug with error location highlighting when the beginning of the line
is replaced with the ellipsis. The wrong location (2 chars off) was pointed to.

Bug spotted and patched by Brett Bieber.



Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.538
retrieving revision 1.539
diff -u -d -r1.538 -r1.539
--- check	11 Jul 2007 12:57:32 -0000	1.538
+++ check	12 Jul 2007 15:46:52 -0000	1.539
@@ -1467,7 +1467,10 @@
 
   #
   # Add elipsis at start if necessary.
-  unless ($start == 0)            {substr $line,  0, 3, '…'};
+  unless ($start == 0)  {
+      substr $line,  0, 3, '…';
+      $col = $col - 2;
+    };
 
   return $line, $col;
 }

Received on Thursday, 12 July 2007 15:46:58 UTC