summaryrefslogtreecommitdiffstats
path: root/usr.bin/sed
diff options
context:
space:
mode:
authordds <dds@FreeBSD.org>2009-09-20 14:11:33 +0000
committerdds <dds@FreeBSD.org>2009-09-20 14:11:33 +0000
commit96199e6b701cfd47d391b0bc4fc2021e8099fc7d (patch)
treefcd1f8a174cab888ac760b6daf92ac9e692c7782 /usr.bin/sed
parent317812e953cee4b6f1caa75d2ee04837f6c96158 (diff)
downloadFreeBSD-src-96199e6b701cfd47d391b0bc4fc2021e8099fc7d.zip
FreeBSD-src-96199e6b701cfd47d391b0bc4fc2021e8099fc7d.tar.gz
Allow [ to be used as a delimiter.
Pointed by: Marius Strobl Obtained from: Apple
Diffstat (limited to 'usr.bin/sed')
-rw-r--r--usr.bin/sed/compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/sed/compile.c b/usr.bin/sed/compile.c
index 53e2af7..a51a314 100644
--- a/usr.bin/sed/compile.c
+++ b/usr.bin/sed/compile.c
@@ -387,7 +387,7 @@ compile_delimited(char *p, char *d)
errx(1, "%lu: %s: newline can not be used as a string delimiter",
linenum, fname);
while (*p) {
- if (*p == '[') {
+ if (*p == '[' && *p != c) {
if ((d = compile_ccl(&p, d)) == NULL)
errx(1, "%lu: %s: unbalanced brackets ([])", linenum, fname);
continue;
OpenPOWER on IntegriCloud