From d54d0de33358b7bcbc5226b390d1dd58d0df1c3a Mon Sep 17 00:00:00 2001 From: brian Date: Tue, 28 Mar 2000 15:14:14 +0000 Subject: [PATCH] don't treat # specially if PARSE_NOHASH is passed --- usr.sbin/ppp/ppp/defs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/ppp/ppp/defs.c b/usr.sbin/ppp/ppp/defs.c index e501f860859..c8b438a6f53 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.10 2000/02/27 01:38:25 brian Exp $ + * $OpenBSD: defs.c,v 1.11 2000/03/28 15:14:14 brian Exp $ */ @@ -297,7 +297,7 @@ MakeArgs(char *script, char **pvect, int maxargs, int flags) int nargs; nargs = 0; - while (*script && *script != '#') { + while (*script && (*script != '#' || (flags & PARSE_NOHASH))) { script += strspn(script, " \t"); if (*script) { if (nargs >= maxargs - 1) @@ -307,7 +307,7 @@ MakeArgs(char *script, char **pvect, int maxargs, int flags) script = findblank(script, flags); if (script == NULL) return -1; - else if (*script == '#') + else if (!(flags & PARSE_NOHASH) && *script == '#') *script = '\0'; else if (*script) *script++ = '\0'; -- 2.20.1