summary refs log tree commit diff
path: root/parse.y
diff options
context:
space:
mode:
authorokan <okan>2010-09-25 20:02:58 +0000
committerokan <okan>2010-09-25 20:02:58 +0000
commit2d66003e4b8013d02370982fdf617510b108144c (patch)
tree245af6c9a5b6bfac2d5787441337945bf11cb119 /parse.y
parent917bce4b8da39e68ed2200f1e2eab09582e7fa34 (diff)
downloadcwm-2d66003e4b8013d02370982fdf617510b108144c.tar.gz
cwm-2d66003e4b8013d02370982fdf617510b108144c.tar.xz
cwm-2d66003e4b8013d02370982fdf617510b108144c.zip
picked a henning diff from src - original log:
fix linecount bug with comments spanning multiple lines
problem reported with the obvious fix for bgpd by Sebastian Benoit
<benoit-lists at fb12.de>, also PR 6432

ok oga@
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 20b1d8b..d86c4e1 100644
--- a/parse.y
+++ b/parse.y
@@ -366,9 +366,10 @@ yylex(void)
 					return (0);
 				if (next == quotec || c == ' ' || c == '\t')
 					c = next;
-				else if (next == '\n')
+				else if (next == '\n') {
+					file->lineno++;
 					continue;
-				else
+				} else
 					lungetc(next);
 			} else if (c == quotec) {
 				*p = '\0';