summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/tr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/tr.c b/coreutils/tr.c
index 54b6abc..96e2c2b 100644
--- a/coreutils/tr.c
+++ b/coreutils/tr.c
@@ -70,7 +70,7 @@ static void convert()
coded = vector[c];
if (del_fl && invec[c])
continue;
- if (sq_fl && last == coded && outvec[coded])
+ if (sq_fl && last == coded && (invec[c] || outvec[coded]))
continue;
output[out_index++] = last = coded;
if (out_index == BUFSIZ) {