r1303 - trunk/varnish-cache/lib/libvcl

phk at projects.linpro.no phk at projects.linpro.no
Sun Apr 1 20:18:54 CEST 2007


Author: phk
Date: 2007-04-01 20:18:54 +0200 (Sun, 01 Apr 2007)
New Revision: 1303

Modified:
   trunk/varnish-cache/lib/libvcl/vcc_token.c
Log:
Fix char position in error messages to be [1...] instead of [0...]

Fix typo in /* ... */ handling


Modified: trunk/varnish-cache/lib/libvcl/vcc_token.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_token.c	2007-04-01 15:34:24 UTC (rev 1302)
+++ trunk/varnish-cache/lib/libvcl/vcc_token.c	2007-04-01 18:18:54 UTC (rev 1303)
@@ -88,7 +88,7 @@
 		} else
 			pos++;
 	}
-	vsb_printf(tl->sb, "(%s Line %d Pos %d)\n", f, lin, pos);
+	vsb_printf(tl->sb, "(%s Line %d Pos %d)\n", f, lin, pos + 1);
 	x = y = 0;
 	for (p = l; p < e && *p != '\n'; p++) {
 		if (*p == '\t') {
@@ -315,7 +315,7 @@
 
 		/* Skip C-style comments */
 		if (*p == '/' && p[1] == '*') {
-			for (q += 2; q < sp->e; q++) {
+			for (q = p + 2; q < sp->e; q++) {
 				if (*q == '*' && q[1] == '/') {
 					p = q + 2;
 					break;




More information about the varnish-commit mailing list