Commit 12b921e2 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fix char position in error messages to be [1...] instead of [0...]

Fix typo in /* ... */ handling


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1303 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent b64624db
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment