diff options
author | brian <brian@cvs.openbsd.org> | 2001-06-15 13:58:17 +0000 |
---|---|---|
committer | brian <brian@cvs.openbsd.org> | 2001-06-15 13:58:17 +0000 |
commit | bd6e19e1e0f1bbb0d7f9094e81bf5f08eaf38b9a (patch) | |
tree | 4651ee2fbe5bebde73edbb6c8830effb8627a96b | |
parent | 9680a34c3c5c28dbaeb36067ad52529b14e36654 (diff) |
Correct the arg count after parsing a line with an unescaped # that isn't
preceeded with whitespace.
-rw-r--r-- | usr.sbin/ppp/ppp/defs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/ppp/ppp/defs.c b/usr.sbin/ppp/ppp/defs.c index 693b405ec32..55e5d5f0b61 100644 --- a/usr.sbin/ppp/ppp/defs.c +++ b/usr.sbin/ppp/ppp/defs.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: defs.c,v 1.19 2000/11/02 00:54:33 brian Exp $ + * $OpenBSD: defs.c,v 1.20 2001/06/15 13:58:16 brian Exp $ */ @@ -313,10 +313,9 @@ MakeArgs(char *script, char **pvect, int maxargs, int flags) script = findblank(script, flags); if (script == NULL) return -1; - else if (!(flags & PARSE_NOHASH) && *script == '#') { + else if (!(flags & PARSE_NOHASH) && *script == '#') *script = '\0'; - nargs--; - } else if (*script) + else if (*script) *script++ = '\0'; } } |