mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-10 08:22:27 +01:00
Don't treat the trailing ']' of an equivalence class expression as a
character in the set. tr -d '[=a=]' was deleting ]'s as well as a's. Noticed by the textutils test suite.
This commit is contained in:
parent
dfac4f3695
commit
e73c3d279c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=98215
@ -227,10 +227,12 @@ genequiv(s)
|
||||
s->equiv[0] = backslash(s);
|
||||
if (*s->str != '=')
|
||||
errx(1, "misplaced equivalence equals sign");
|
||||
s->str += 2;
|
||||
} else {
|
||||
s->equiv[0] = s->str[0];
|
||||
if (s->str[1] != '=')
|
||||
errx(1, "misplaced equivalence equals sign");
|
||||
s->str += 3;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -254,7 +256,6 @@ genequiv(s)
|
||||
s->equiv[p] = OOBCH;
|
||||
}
|
||||
|
||||
s->str += 2;
|
||||
s->cnt = 0;
|
||||
s->state = SET;
|
||||
s->set = s->equiv;
|
||||
|
Loading…
Reference in New Issue
Block a user