]> err.no Git - varnish/commitdiff
Fix char position in error messages to be [1...] instead of [0...]
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 1 Apr 2007 18:18:54 +0000 (18:18 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 1 Apr 2007 18:18:54 +0000 (18:18 +0000)
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

index 9e496724968791318036ca4bea7c1b5904be25a1..21d5119dac48b4b8d853ee13af8bae5d46c43724 100644 (file)
@@ -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;