Special fix just for

tr -[cC]s '[:upper:]' '[:lower:]'
case (or vice versa):
chars taken from s2 can be different this time
due to lack of complex upper/lower processing,
so fill string2 again to not miss some.
This commit is contained in:
Andrey A. Chernov 2003-08-04 02:57:17 +00:00
parent 11dc7df11d
commit 796263418b

View File

@ -291,6 +291,13 @@ endloop:
for (cnt = 0; cnt < n; cnt++) {
(void)next(&s2);
string1[carray[cnt]] = s2.lastch;
/*
* Chars taken from s2 can be different this time
* due to lack of complex upper/lower processing,
* so fill string2 again to not miss some.
*/
if (sflag)
string2[s2.lastch] = 1;
}
}