From ed91a473978915cfafe0e0c8747a4ba3cafad9ec Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 1 Apr 2007 18:18:54 +0000 Subject: [PATCH] Fix char position in error messages to be [1...] instead of [0...] Fix typo in /* ... */ handling git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1303 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/lib/libvcl/vcc_token.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/varnish-cache/lib/libvcl/vcc_token.c b/varnish-cache/lib/libvcl/vcc_token.c index 9e496724..21d5119d 100644 --- a/varnish-cache/lib/libvcl/vcc_token.c +++ b/varnish-cache/lib/libvcl/vcc_token.c @@ -88,7 +88,7 @@ vcc_ErrWhere(struct tokenlist *tl, struct token *t) } 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 @@ vcc_Lexer(struct tokenlist *tl, struct source *sp) /* 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; -- 2.39.5