summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-03-30 08:28:11 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-03-30 08:28:11 +0000
commit3ed912067951a2ee25681d31d219c61be620bac2 (patch)
tree40646f0c60faf945e8983cf52de688ddcb04d790
parent9bc3427c9382062060852f77940ed2e4da3288d8 (diff)
Adjust the input string by the right amount if the pattern wasn't at the
beginning. From NetBSD (mycroft).
-rw-r--r--bin/pax/pat_rep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/pax/pat_rep.c b/bin/pax/pat_rep.c
index afe44a41030..3b0206ebb6f 100644
--- a/bin/pax/pat_rep.c
+++ b/bin/pax/pat_rep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pat_rep.c,v 1.6 1997/02/27 23:32:59 michaels Exp $ */
+/* $OpenBSD: pat_rep.c,v 1.7 1997/03/30 08:28:10 millert Exp $ */
/* $NetBSD: pat_rep.c,v 1.4 1995/03/21 09:07:33 cgd Exp $ */
/*-
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)pat_rep.c 8.2 (Berkeley) 4/18/94";
#else
-static char rcsid[] = "$OpenBSD: pat_rep.c,v 1.6 1997/02/27 23:32:59 michaels Exp $";
+static char rcsid[] = "$OpenBSD: pat_rep.c,v 1.7 1997/03/30 08:28:10 millert Exp $";
#endif
#endif /* not lint */
@@ -1011,7 +1011,7 @@ rep_name(name, nlen, prnt)
# ifdef NET2_REGEX
inpt = pt->rcmp->endp[0];
# else
- inpt += pm[0].rm_eo;
+ inpt += pm[0].rm_eo - pm[0].rm_so;
# endif
if ((outpt == endpt) || (*inpt == '\0'))