diff options
author | 2010-07-01 17:02:02 +0000 | |
---|---|---|
committer | 2010-07-01 17:02:02 +0000 | |
commit | fc40af3fbe2deebacfbd8c5749c6bcc16bc2392c (patch) | |
tree | 8880cd8a6395f82c671693fe140fb08a3f4ef4b2 /usr.bin/sed/compile.c | |
parent | Learn wsconsctl to handle more than the first keyboard, mouse and display. (diff) | |
download | wireguard-openbsd-fc40af3fbe2deebacfbd8c5749c6bcc16bc2392c.tar.xz wireguard-openbsd-fc40af3fbe2deebacfbd8c5749c6bcc16bc2392c.zip |
Allow [ to be used as a delimiter.
From FreeBSD; ok millert@ halex@
Diffstat (limited to 'usr.bin/sed/compile.c')
-rw-r--r-- | usr.bin/sed/compile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/sed/compile.c b/usr.bin/sed/compile.c index f8f8a05be10..4b5b33b95db 100644 --- a/usr.bin/sed/compile.c +++ b/usr.bin/sed/compile.c @@ -1,4 +1,4 @@ -/* $OpenBSD: compile.c,v 1.31 2009/10/27 23:59:43 deraadt Exp $ */ +/* $OpenBSD: compile.c,v 1.32 2010/07/01 17:02:02 naddy Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -357,7 +357,7 @@ compile_delimited(char *p, char *d) else if (c == '\n') err(COMPILE, "newline can not be used as a string delimiter"); while (*p) { - if (*p == '[') { + if (*p == '[' && *p != c) { if ((d = compile_ccl(&p, d)) == NULL) err(COMPILE, "unbalanced brackets ([])"); continue; |