Allow [ to be used as a delimiter.

Pointed by:	Marius Strobl
Obtained from:	Apple
This commit is contained in:
Diomidis Spinellis
2009-09-20 14:11:33 +00:00
parent 8d5e165e7f
commit 128e6a12b5
2 changed files with 10 additions and 1 deletions
+1 -1
View File
@@ -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;