aboutsummaryrefslogtreecommitdiff
path: root/tr.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-12-06 22:53:06 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-12-06 22:53:06 +0000
commita715af2bf60a7b4e7b8dead5878152edbc9eef0e (patch)
treebecf91e1b6467562965461eab3a5d9363168a2ba /tr.c
parent764205ea20e9585b78bd55a1b960580cfca63db0 (diff)
downloadbusybox-w32-a715af2bf60a7b4e7b8dead5878152edbc9eef0e.tar.gz
busybox-w32-a715af2bf60a7b4e7b8dead5878152edbc9eef0e.tar.bz2
busybox-w32-a715af2bf60a7b4e7b8dead5878152edbc9eef0e.zip
Patch from Matt Kraai to fix 'echo "1 2 3" | tr -s " "'
so it properly outputs "1 2 3". git-svn-id: svn://busybox.net/trunk/busybox@1387 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'tr.c')
-rw-r--r--tr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tr.c b/tr.c
index 54b6abc8c..96e2c2b5f 100644
--- a/tr.c
+++ b/tr.c
@@ -70,7 +70,7 @@ static void convert()
70 coded = vector[c]; 70 coded = vector[c];
71 if (del_fl && invec[c]) 71 if (del_fl && invec[c])
72 continue; 72 continue;
73 if (sq_fl && last == coded && outvec[coded]) 73 if (sq_fl && last == coded && (invec[c] || outvec[coded]))
74 continue; 74 continue;
75 output[out_index++] = last = coded; 75 output[out_index++] = last = coded;
76 if (out_index == BUFSIZ) { 76 if (out_index == BUFSIZ) {