diff options
Diffstat (limited to 'usr.sbin/ifstated/parse.y')
-rw-r--r-- | usr.sbin/ifstated/parse.y | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/ifstated/parse.y b/usr.sbin/ifstated/parse.y index 3f208429dcf..c1408fc45d0 100644 --- a/usr.sbin/ifstated/parse.y +++ b/usr.sbin/ifstated/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.27 2008/03/10 07:40:01 mpf Exp $ */ +/* $OpenBSD: parse.y,v 1.28 2008/10/17 13:02:55 henning Exp $ */ /* * Copyright (c) 2004 Ryan McBride <mcbride@openbsd.org> @@ -480,11 +480,13 @@ findeol(void) int c; parsebuf = NULL; - pushback_index = 0; /* skip to either EOF or the first real EOL */ while (1) { - c = lgetc(0); + if (pushback_index) + c = pushback_buffer[--pushback_index]; + else + c = lgetc(0); if (c == '\n') { file->lineno++; break; |