From 797c04a7a32490e7034e9be798efb304e54012c8 Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Fri, 15 Jun 2001 13:58:06 +0000 Subject: [PATCH] Correct the arg count after parsing a line with an unescaped # that isn't preceeded with whitespace. MFC after: 3 weeks --- usr.sbin/ppp/defs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.sbin/ppp/defs.c b/usr.sbin/ppp/defs.c index 292436813a3c..0e61f8841b80 100644 --- a/usr.sbin/ppp/defs.c +++ b/usr.sbin/ppp/defs.c @@ -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'; } }