diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2008-10-17 14:33:16 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2008-10-17 14:33:16 +0000 |
commit | 2c62b4611cd1ca209c7d3bb5995e6de957825c07 (patch) | |
tree | 7d22b1bafbb174b5b68e179147673f4e96601c3d /sbin/ipsecctl/parse.y | |
parent | 0192dc69f688eb08635287c5fba73fc56ac6c2f2 (diff) |
findeol() fix from pfctl
Diffstat (limited to 'sbin/ipsecctl/parse.y')
-rw-r--r-- | sbin/ipsecctl/parse.y | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/ipsecctl/parse.y b/sbin/ipsecctl/parse.y index 9bf95d429a4..bc2df9d18ee 100644 --- a/sbin/ipsecctl/parse.y +++ b/sbin/ipsecctl/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.138 2008/07/01 14:31:37 bluhm Exp $ */ +/* $OpenBSD: parse.y,v 1.139 2008/10/17 14:33:15 henning Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -1015,11 +1015,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; |