From 2c62b4611cd1ca209c7d3bb5995e6de957825c07 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Fri, 17 Oct 2008 14:33:16 +0000 Subject: findeol() fix from pfctl --- sbin/ipsecctl/parse.y | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sbin/ipsecctl/parse.y') 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 @@ -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; -- cgit v1.2.3