tr: Fix -c option when translating

This commit is contained in:
Michael Forney 2015-04-27 00:49:02 +00:00 committed by sin
parent e34bcca3e3
commit 035e14c516

2
tr.c
View File

@ -221,6 +221,8 @@ read:
else else
goto write; goto write;
} }
if (cflag)
goto write;
for (m = 0; m < i; m++) for (m = 0; m < i; m++)
off1 += rangelen(set1[m]); off1 += rangelen(set1[m]);
off1 += r - set1[m].start; off1 += r - set1[m].start;