diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-04-15 15:06:14 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-04-15 15:06:14 +0000 |
commit | 062c1cd9d6f472b3d693973c5e897903dda6ea03 (patch) | |
tree | 037f5de0f401529e1396a79f05688c84831f0566 /usr.sbin/netgroup_mkdb | |
parent | 40342a525c01a1c557720ca024d811c2042c9ace (diff) |
handle \\ at start of line; christos
Diffstat (limited to 'usr.sbin/netgroup_mkdb')
-rw-r--r-- | usr.sbin/netgroup_mkdb/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/netgroup_mkdb/util.c b/usr.sbin/netgroup_mkdb/util.c index 6a82557e561..b418409caf2 100644 --- a/usr.sbin/netgroup_mkdb/util.c +++ b/usr.sbin/netgroup_mkdb/util.c @@ -30,7 +30,7 @@ */ #ifndef lint -static char *rcsid = "$Id: util.c,v 1.1 1995/10/18 08:47:57 deraadt Exp $"; +static char *rcsid = "$Id: util.c,v 1.2 1997/04/15 15:06:13 deraadt Exp $"; #endif #include <err.h> @@ -91,7 +91,7 @@ getline(fp, size) } if (ptr[s - 1] == '\n') /* the newline may be missing at EOF */ s--; /* forget newline */ - if ((cnt = (ptr[s - 1] == '\\'))) /* check for \\ */ + if (s && (cnt = (ptr[s - 1] == '\\'))) /* check for \\ */ s--; /* forget \\ */ buf = erealloc(buf, len + s + 1); |