summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/regress/lib/libc/regex/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/regress/lib/libc/regex/main.c b/src/regress/lib/libc/regex/main.c
index e0ed86f5e8..92257a7179 100644
--- a/src/regress/lib/libc/regex/main.c
+++ b/src/regress/lib/libc/regex/main.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: main.c,v 1.7 2007/09/12 19:32:35 otto Exp $ */ 1/* $OpenBSD: main.c,v 1.8 2016/05/26 13:33:53 schwarze Exp $ */
2/* $NetBSD: main.c,v 1.2 1995/04/20 22:39:51 cgd Exp $ */ 2/* $NetBSD: main.c,v 1.2 1995/04/20 22:39:51 cgd Exp $ */
3 3
4#include <stdio.h> 4#include <stdio.h>
@@ -260,6 +260,9 @@ int opts; /* may not match f1 */
260 fprintf(stderr, "%d: bad STARTEND syntax\n", line); 260 fprintf(stderr, "%d: bad STARTEND syntax\n", line);
261 subs[0].rm_so = strchr(f2, '(') - f2 + 1; 261 subs[0].rm_so = strchr(f2, '(') - f2 + 1;
262 subs[0].rm_eo = strchr(f2, ')') - f2; 262 subs[0].rm_eo = strchr(f2, ')') - f2;
263 /* the preceding character is relevant with REG_NOTBOL */
264 f2copy[subs[0].rm_so - 1] = subs[0].rm_so > 1 ?
265 f2copy[subs[0].rm_so - 2] : 'X';
263 } 266 }
264 err = regexec(&re, f2copy, NSUBS, subs, options('e', f1)); 267 err = regexec(&re, f2copy, NSUBS, subs, options('e', f1));
265 268