summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2010-05-21 19:21:47 +0000
committermarius <marius@FreeBSD.org>2010-05-21 19:21:47 +0000
commite55ff4c6125f3dbeca0bdfc70826fcf252a1bf75 (patch)
tree2dbe35cab2716dd9a3ae3f4d4e140c835e4b241c /usr.bin
parent5b4ca952238ec7d5548343c0f15909a607b2fd9f (diff)
downloadFreeBSD-src-e55ff4c6125f3dbeca0bdfc70826fcf252a1bf75.zip
FreeBSD-src-e55ff4c6125f3dbeca0bdfc70826fcf252a1bf75.tar.gz
MFC: r197356
Allow [ to be used as a delimiter. Pointed by: Marius Strobl Obtained from: Apple
Diffstat (limited to 'usr.bin')
-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