aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2003-08-04 02:57:17 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2003-08-04 02:57:17 +0000
commit796263418b77094014f841760c1c477d1f82029c (patch)
treeafc710b3f15820432af5bd73298fa387da0f26e4 /usr.bin
parent11dc7df11ddc6cf1cb8051d5f6051665596a9853 (diff)
Notes
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tr/tr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/usr.bin/tr/tr.c b/usr.bin/tr/tr.c
index 91c0e9c9ab3f1..a22ba136dc8e9 100644
--- a/usr.bin/tr/tr.c
+++ b/usr.bin/tr/tr.c
@@ -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;
}
}